diff options
| author | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-04-04 19:07:19 +0200 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-04-04 19:07:19 +0200 | 
| commit | ed54f33ef281d886b45c47f1ef491aeaa4785756 (patch) | |
| tree | f15a983bbcfdb98ca5e102cc0014a14a8eb1163e | |
| parent | 7057a537f4f28d80379500ab2e9c4d078bb01682 (diff) | |
| download | Ishtar-ed54f33ef281d886b45c47f1ef491aeaa4785756.tar.bz2 Ishtar-ed54f33ef281d886b45c47f1ef491aeaa4785756.zip  | |
Fix finds display
| -rw-r--r-- | archaeological_finds/models.py | 8 | 
1 files changed, 6 insertions, 2 deletions
diff --git a/archaeological_finds/models.py b/archaeological_finds/models.py index a02cb4402..ce0df10cf 100644 --- a/archaeological_finds/models.py +++ b/archaeological_finds/models.py @@ -82,7 +82,9 @@ class BaseFind(BaseHistorizedItem, OwnPerms):          return settings.JOINT.join(finds)      def _real_label(self): -        if not self.context_record.parcel.operation.code_patriarche: +        if not self.context_record.parcel \ +           or not self.context_record.parcel.operation \ +           or not self.context_record.parcel.operation.code_patriarche:              return          find = self.get_last_find()          lbl = find.label or self.label @@ -92,7 +94,9 @@ class BaseFind(BaseHistorizedItem, OwnPerms):                             lbl) if it])      def _temp_label(self): -        if self.context_record.parcel.operation.code_patriarche: +        if not self.context_record.parcel \ +           or not self.context_record.parcel.operation \ +           or not self.context_record.parcel.operation.code_patriarche:              return          find = self.get_last_find()          lbl = find.label or self.label  | 
