summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ishtar_common/data_importer.py2
-rw-r--r--ishtar_common/models.py8
2 files changed, 5 insertions, 5 deletions
diff --git a/ishtar_common/data_importer.py b/ishtar_common/data_importer.py
index 847134085..2595134d0 100644
--- a/ishtar_common/data_importer.py
+++ b/ishtar_common/data_importer.py
@@ -1409,7 +1409,7 @@ class Importer(object):
field_name, value, data, formater.force_value,
force_new=force_news[idx], concat=concats[idx],
concat_str=concat_str[idx])
- c_row.append(u" ; ".join([v for v in c_values]))
+ c_row.append(" ; ".join([v for v in c_values]))
def _get_field_m2m(self, attribute, data, c_path, new_created,
field_object):
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,