diff options
Diffstat (limited to 'archaeological_operations')
-rw-r--r-- | archaeological_operations/tests.py | 6 | ||||
-rw-r--r-- | archaeological_operations/wizards.py | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/archaeological_operations/tests.py b/archaeological_operations/tests.py index 2e6914b6c..8b0b81571 100644 --- a/archaeological_operations/tests.py +++ b/archaeological_operations/tests.py @@ -1196,10 +1196,10 @@ class OperationWizardCreationTest(WizardTest, OperationInitTest, TestCase): file = FI.item file.towns.add(town) parcel = models.Parcel.objects.create( - town=town, year=2017, section='S', parcel_number='42' + town=town, year=2017, section='G', parcel_number='43' ) file.parcels.add(parcel) - self.form_datas[2].set('filechoice', 'pk', file.pk) + self.form_datas[2].set('filechoice', 'associated_file', file.pk) self.form_datas[2].append('towns', town_data) self.form_datas[2].append('parcels', {'parcel': parcel.pk}) @@ -1211,7 +1211,7 @@ class OperationWizardCreationTest(WizardTest, OperationInitTest, TestCase): self.assertEqual(models.Operation.objects.count(), self.operation_number + 3) self.assertEqual(models.Parcel.objects.count(), - self.parcel_number + 2) + self.parcel_number + 3) class OperationWizardModifTest(WizardTest, OperationInitTest, TestCase): diff --git a/archaeological_operations/wizards.py b/archaeological_operations/wizards.py index b9ff96cad..02d462f66 100644 --- a/archaeological_operations/wizards.py +++ b/archaeological_operations/wizards.py @@ -506,7 +506,7 @@ def has_associated_file(form_name, file_key='associated_file', negate=False): 'step_data'][form_name][form_name + '-' + file_key] if type(file_id) in (list, tuple): file_id = file_id[0] - file_id = int(file_id) + int(file_id) return not negate except ValueError: return negate |