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 | 75f1b7231e3301f889665ba9e0928b31060b7264 (patch) | |
tree | 450fd988cf84b43a1f32e3ab559ffb29ab231ae2 /archaeological_operations/wizards.py | |
parent | dd19d5acb424de46946b6a96b9fac656351e38d5 (diff) | |
parent | 7b397b211a66672a522fc4e1814df853326e7b55 (diff) | |
download | Ishtar-75f1b7231e3301f889665ba9e0928b31060b7264.tar.bz2 Ishtar-75f1b7231e3301f889665ba9e0928b31060b7264.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) \ |