summaryrefslogtreecommitdiff
path: root/archaeological_finds/wizards.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2016-12-20 13:50:37 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2016-12-20 13:50:37 +0100
commit8b2ce8ee16a8ce40c09c5e5cb7bd9e8cd48a3368 (patch)
tree8b0e6033fe85891b6bb0eef6d4665b6465996dc2 /archaeological_finds/wizards.py
parentf42ea0f49a4d5c5a6cb15758d2bc8edaacc49ec3 (diff)
downloadIshtar-8b2ce8ee16a8ce40c09c5e5cb7bd9e8cd48a3368.tar.bz2
Ishtar-8b2ce8ee16a8ce40c09c5e5cb7bd9e8cd48a3368.zip
Fix find creation (refs #3399) - improve wizard test management
Diffstat (limited to 'archaeological_finds/wizards.py')
-rw-r--r--archaeological_finds/wizards.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/archaeological_finds/wizards.py b/archaeological_finds/wizards.py
index c9d492329..d7e3dbac0 100644
--- a/archaeological_finds/wizards.py
+++ b/archaeological_finds/wizards.py
@@ -25,6 +25,7 @@ from ishtar_common.wizards import Wizard, DeletionWizard, SourceWizard
from archaeological_operations.wizards import OperationAdministrativeActWizard
from archaeological_operations.models import AdministrativeAct
+from archaeological_context_records.models import ContextRecord
import models
@@ -40,7 +41,7 @@ class FindWizard(Wizard):
main_form_key = 'selecrecord-' + self.url_name
try:
idx = int(self.session_get_value(main_form_key, 'pk'))
- current_cr = models.ContextRecord.objects.get(pk=idx)
+ current_cr = ContextRecord.objects.get(pk=idx)
return current_cr
except(TypeError, ValueError, ObjectDoesNotExist):
pass
@@ -66,7 +67,7 @@ class FindWizard(Wizard):
def get_extra_model(self, dct, form_list):
dct = super(FindWizard, self).get_extra_model(dct, form_list)
dct['order'] = 1
- if 'pk' in dct and type(dct['pk']) == models.ContextRecord:
+ if 'pk' in dct and type(dct['pk']) == ContextRecord:
dct['base_finds__context_record'] = dct.pop('pk')
return dct