From 94c1dd518ba5a2cd0f1624c27ca57721c8a67141 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 14 Feb 2019 16:32:52 +0100 Subject: Operation: fix possibl infinte loop when no label is provided --- archaeological_operations/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'archaeological_operations/models.py') diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index 843d0d1e9..b5e6a7754 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -929,8 +929,9 @@ class Operation(ClosedItem, BaseHistorizedItem, OwnPerms, ValueGetter, return cls._return_get_owns(owns, values, get_short_menu_class) def __unicode__(self): - if self.cached_label: + if self.cached_label or getattr(self, "_label_checked", False): return self.cached_label + self._label_checked = True self.save() return self.cached_label -- cgit v1.2.3