diff options
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 |
commit | ec49fcefb6e63eb7efb1bca59a1fc717769438c4 (patch) | |
tree | 489e3b5b05f8645021a42d3e0f028608a162ba1a | |
parent | f3bc312eccb7b03824915f7fd2918a0d247d90d8 (diff) | |
download | Ishtar-ec49fcefb6e63eb7efb1bca59a1fc717769438c4.tar.bz2 Ishtar-ec49fcefb6e63eb7efb1bca59a1fc717769438c4.zip |
Fix basket displaying in default menu (refs #3343)
-rw-r--r-- | archaeological_finds/models.py | 4 |
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) |