summaryrefslogtreecommitdiff
path: root/archaeological_files/wizards.py
diff options
context:
space:
mode:
authorroot <root@viserion.(none)>2013-04-04 22:43:13 +0000
committerroot <root@viserion.(none)>2013-04-04 22:43:13 +0000
commit0b9a486b5e79d36c7eb7fa9592e1ebb4ec9ae668 (patch)
treea2c624b1ce76c6d57a8a156766e4863710d8ae19 /archaeological_files/wizards.py
parent199f535e39880d6ddbbe6a068378fec7ff9fc084 (diff)
parentb2a879890cef5721accff66904be478de488b120 (diff)
downloadIshtar-0b9a486b5e79d36c7eb7fa9592e1ebb4ec9ae668.tar.bz2
Ishtar-0b9a486b5e79d36c7eb7fa9592e1ebb4ec9ae668.zip
Merge branch 'master' of lysithea.proxience.net:/home/proxience/git/ishtar
Diffstat (limited to 'archaeological_files/wizards.py')
-rw-r--r--archaeological_files/wizards.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/archaeological_files/wizards.py b/archaeological_files/wizards.py
index e2f6722ef..c475de47d 100644
--- a/archaeological_files/wizards.py
+++ b/archaeological_files/wizards.py
@@ -25,16 +25,18 @@ from django.template import RequestContext
from django.utils.translation import ugettext_lazy as _
from ishtar_common.wizards import Wizard, ClosingWizard
-from archaeological_operations.wizards import OperationAdministrativeActWizard,\
+from archaeological_operations.wizards import OperationWizard,\
+ OperationAdministrativeActWizard,\
AdministrativeActDeletionWizard
from ishtar_common.models import Town
from archaeological_operations.models import AdministrativeAct, Parcel, \
Operation
import models
-class FileWizard(Wizard):
+class FileWizard(OperationWizard):
model = models.File
object_parcel_type = 'associated_file'
+ parcel_step_key = 'parcels-'
def get_form(self, step=None, data=None, files=None):
"""
@@ -103,7 +105,7 @@ class FileWizard(Wizard):
continue
try:
dct['town'] = models.Town.objects.get(pk=int(dct['town']))
- except (ValueError, ObjectDoesNotExist):
+ except (ValueError, ObjectDoesNotExist, KeyError):
continue
dct['associated_file'], dct['operation'] = None, None
dct[self.object_parcel_type] = obj