diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-09-09 20:39:08 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-09-09 20:39:08 +0200 |
commit | 67c92cbbd528180be6e35717297391e891d1540c (patch) | |
tree | 0cf74366ae074bdd70ca389b1d77b5aaefc32f05 /archaeological_finds/models.py | |
parent | 6ee8c39a2e8e053810bea643fdf0f8c3fa21374b (diff) | |
download | Ishtar-67c92cbbd528180be6e35717297391e891d1540c.tar.bz2 Ishtar-67c92cbbd528180be6e35717297391e891d1540c.zip |
Fix tests with bad initialization
Diffstat (limited to 'archaeological_finds/models.py')
-rw-r--r-- | archaeological_finds/models.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/archaeological_finds/models.py b/archaeological_finds/models.py index 603e046ee..5811ded6e 100644 --- a/archaeological_finds/models.py +++ b/archaeological_finds/models.py @@ -450,8 +450,8 @@ class Find(BaseHistorizedItem, ImageModel, OwnPerms, ShortMenuItem): @property def administrative_index(self): bf = self.get_first_base_find() - if not bf: - return + if not bf or not bf.context_record or not bf.context_record.operation: + return "" return "{}-{}".format( bf.context_record.operation.get_reference(), self.index) |