diff options
author | Étienne Loks <etienne.loks@proxience.com> | 2015-07-10 21:20:43 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@proxience.com> | 2015-07-10 21:20:43 +0200 |
commit | 6f50ea8965abd59e91e18390dd6305635a9fc3d7 (patch) | |
tree | 450fd988cf84b43a1f32e3ab559ffb29ab231ae2 /archaeological_operations/wizards.py | |
parent | 7a10be6aa9afb55beb461f5ea2eef1750750187a (diff) | |
parent | a500dd90aca319d9306cf08c7c5ad73d4e27a261 (diff) | |
download | Ishtar-6f50ea8965abd59e91e18390dd6305635a9fc3d7.tar.bz2 Ishtar-6f50ea8965abd59e91e18390dd6305635a9fc3d7.zip |
Merge branch 'stable'
Diffstat (limited to 'archaeological_operations/wizards.py')
-rw-r--r-- | archaeological_operations/wizards.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/archaeological_operations/wizards.py b/archaeological_operations/wizards.py index c7c375a49..01e717b18 100644 --- a/archaeological_operations/wizards.py +++ b/archaeological_operations/wizards.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2012-2014 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet> +# Copyright (C) 2012-2015 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -114,10 +114,11 @@ class OperationWizard(Wizard): parcels = [] current_parcels = [] operation = self.get_current_object() - for parcel in operation.parcels.all(): - current_parcels.append((parcel.town, parcel.section, - parcel.parcel_number)) - parcels.append((parcel.pk, parcel.short_label)) + if operation: + for parcel in operation.parcels.all(): + current_parcels.append((parcel.town, parcel.section, + parcel.parcel_number)) + parcels.append((parcel.pk, parcel.short_label)) try: for parcel in file.parcels.all(): if (parcel.town, parcel.section, parcel.parcel_number) \ |