From f6a8df267c60af1a1dc8a60f9d7df5be1ccc3dc8 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 24 May 2019 14:36:16 +0200 Subject: Fix code_patriarche check when an integer is provided --- archaeological_operations/models.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'archaeological_operations') diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index 5ab7dffbc..996ede679 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -1054,6 +1054,8 @@ class Operation(ClosedItem, DocumentItem, BaseHistorizedItem, QRCodeItem, def short_code_patriarche(self): if not self.code_patriarche: return u"" + if isinstance(self.code_patriarche, int): + self.code_patriarche = str(self.code_patriarche) profile = get_current_profile() if not profile.operation_region_code or \ not self.code_patriarche.startswith( -- cgit v1.2.3