summaryrefslogtreecommitdiff
path: root/archaeological_finds/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2016-10-21 12:08:50 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2016-10-21 12:08:50 +0200
commit75b2768545ad4cab06849736d21e381a11b1d3d1 (patch)
tree489e3b5b05f8645021a42d3e0f028608a162ba1a /archaeological_finds/models.py
parent9ea950ef761260d2b4e1706b6b76a57f67d93461 (diff)
downloadIshtar-75b2768545ad4cab06849736d21e381a11b1d3d1.tar.bz2
Ishtar-75b2768545ad4cab06849736d21e381a11b1d3d1.zip
Fix basket displaying in default menu (refs #3343)
Diffstat (limited to 'archaeological_finds/models.py')
-rw-r--r--archaeological_finds/models.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/archaeological_finds/models.py b/archaeological_finds/models.py
index 969e9b966..fcbeb2d25 100644
--- a/archaeological_finds/models.py
+++ b/archaeological_finds/models.py
@@ -634,7 +634,9 @@ class Find(BaseHistorizedItem, ImageModel, OwnPerms, ShortMenuItem):
owns = super(Find, cls).get_owns(
user, replace_query=replace_query,
limit=limit)
- return sorted(owns, key=lambda x: x.cached_label)
+ return sorted(
+ owns, key=lambda x: x.cached_label
+ if hasattr(x, 'cached_label') else unicode(x))
def _generate_cached_label(self):
return unicode(self)