summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2019-02-14 16:32:52 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2019-02-14 16:32:52 +0100
commit767af9b51d72c94489befd0e6d8a71a5c8352fba (patch)
treee02797bedbf05f83f405842fbcc79f5920ae5b70
parentd1fa2fdb35d06584782d59d3bb1d56a6be1260bb (diff)
downloadIshtar-767af9b51d72c94489befd0e6d8a71a5c8352fba.tar.bz2
Ishtar-767af9b51d72c94489befd0e6d8a71a5c8352fba.zip
Operation: fix possibl infinte loop when no label is provided
-rw-r--r--archaeological_operations/models.py3
1 files changed, 2 insertions, 1 deletions
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