From c909dc8902c4fe51394982146c133eaa85c277a0 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 15 Dec 2020 18:37:26 +0100 Subject: Fix null -> "" errors - fix tests --- ishtar_common/tests.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'ishtar_common/tests.py') diff --git a/ishtar_common/tests.py b/ishtar_common/tests.py index 05799a0aa..60e087794 100644 --- a/ishtar_common/tests.py +++ b/ishtar_common/tests.py @@ -1825,10 +1825,14 @@ class ShortMenuTest(TestCase): user = self.other_user from archaeological_operations.models import Operation, OperationType ope_type, created = OperationType.objects.get_or_create(label="test") + idx = 1 + while Operation.objects.filter(code_patriarche=str(idx)).count(): + idx += 1 return Operation.objects.create( operation_type=ope_type, history_modifier=user, - year=2042, operation_code=54 + year=2042, operation_code=54, + code_patriarche=str(idx) ) def test_not_connected(self): -- cgit v1.2.3