diff options
Diffstat (limited to 'ishtar_common/models.py')
-rw-r--r-- | ishtar_common/models.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 0d99ad4db..0e68bf7dd 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -446,14 +446,14 @@ class OwnPerms(object): if not values: if not get_short_menu_class: return sorted_values + list( - sorted(owns, key=lambda x: getattr(x, label_key))) + sorted(owns, key=lambda x: getattr(x, label_key) or "")) return sorted_values + list( - sorted(owns, key=lambda x: getattr(x[0], label_key))) + sorted(owns, key=lambda x: getattr(x[0], label_key) or "")) if not get_short_menu_class: return sorted_values + list( - sorted(owns, key=lambda x: x[label_key])) + sorted(owns, key=lambda x: x[label_key] or "")) return sorted_values + list( - sorted(owns, key=lambda x: x[0][label_key])) + sorted(owns, key=lambda x: x[0][label_key] or "")) @classmethod def get_owns(cls, user, replace_query=None, limit=None, values=None, |