diff options
-rw-r--r-- | archaeological_operations/tests.py | 8 | ||||
-rw-r--r-- | archaeological_operations/wizards.py | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/archaeological_operations/tests.py b/archaeological_operations/tests.py index 5b7f71e1b..5eeeb1808 100644 --- a/archaeological_operations/tests.py +++ b/archaeological_operations/tests.py @@ -678,7 +678,9 @@ class OperationAdminActWizardCreationTest(WizardTest, OperationInitTest, def pre_wizard(self): ope = self.get_default_operation() - self.operation_number = models.Operation.objects.count() + + self.number = models.AdministrativeAct.objects.count() + data = self.form_datas[0][0] data['selec-operation_administrativeactop']['pk'] = ope.pk act = models.ActType.objects.filter(intented_to='O').all()[0].pk @@ -688,5 +690,5 @@ class OperationAdminActWizardCreationTest(WizardTest, OperationInitTest, super(OperationAdminActWizardCreationTest, self).pre_wizard() def post_wizard(self): - self.assertEqual(models.Operation.objects.count(), - self.operation_number + 1) + self.assertEqual(models.AdministrativeAct.objects.count(), + self.number + 1) diff --git a/archaeological_operations/wizards.py b/archaeological_operations/wizards.py index 0cc336cc8..ee8acd9c1 100644 --- a/archaeological_operations/wizards.py +++ b/archaeological_operations/wizards.py @@ -411,7 +411,7 @@ class OperationAdministrativeActWizard(OperationWizard): if wizard_done_window: dct['wizard_done_window'] = wizard_done_window # redirect to the generated doc - if r and r[0]: + if r and type(r) in (tuple, list) and r[0]: dct['redirect'] = reverse('generatedoc-administrativeactop', args=[admact.pk, r[0]]) # make the new object a default |