diff options
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 |
commit | fa07d144fdf6bd89ee6d1014243aacbeb722b09c (patch) | |
tree | 8b0e6033fe85891b6bb0eef6d4665b6465996dc2 /archaeological_finds/wizards.py | |
parent | 2d7e9cd3d49e918f37a30352f35d1ad4c2ace769 (diff) | |
download | Ishtar-fa07d144fdf6bd89ee6d1014243aacbeb722b09c.tar.bz2 Ishtar-fa07d144fdf6bd89ee6d1014243aacbeb722b09c.zip |
Fix find creation (refs #3399) - improve wizard test management
Diffstat (limited to 'archaeological_finds/wizards.py')
-rw-r--r-- | archaeological_finds/wizards.py | 5 |
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 |