diff options
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 |
commit | 94c1dd518ba5a2cd0f1624c27ca57721c8a67141 (patch) | |
tree | e02797bedbf05f83f405842fbcc79f5920ae5b70 /archaeological_operations/models.py | |
parent | fec0157b76434083af3eb2cb539905ec7553c17e (diff) | |
download | Ishtar-94c1dd518ba5a2cd0f1624c27ca57721c8a67141.tar.bz2 Ishtar-94c1dd518ba5a2cd0f1624c27ca57721c8a67141.zip |
Operation: fix possibl infinte loop when no label is provided
Diffstat (limited to 'archaeological_operations/models.py')
-rw-r--r-- | archaeological_operations/models.py | 3 |
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 |