summaryrefslogtreecommitdiff
path: root/ishtar_common
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common')
-rw-r--r--ishtar_common/backend.py4
-rw-r--r--ishtar_common/models.py1
2 files changed, 3 insertions, 2 deletions
diff --git a/ishtar_common/backend.py b/ishtar_common/backend.py
index 0febd61b2..f48e6ddec 100644
--- a/ishtar_common/backend.py
+++ b/ishtar_common/backend.py
@@ -53,11 +53,11 @@ class ObjectPermBackend(ModelBackend):
if not main_right or not is_ownperm:
return main_right
if obj is None:
- model_name = perm.split('_')[-1].capitalize()
+ model_name = perm.split('_')[-1].lower()
model = None
for app in cache.get_apps():
for modl in cache.get_models(app):
- if modl.__name__ == model_name:
+ if modl.__name__.lower() == model_name:
model = modl
if not model:
return False
diff --git a/ishtar_common/models.py b/ishtar_common/models.py
index 48218ba94..c4dcd4c44 100644
--- a/ishtar_common/models.py
+++ b/ishtar_common/models.py
@@ -1982,6 +1982,7 @@ class Person(Address, Merge, OwnPerms, ValueGetter):
res = cache.get(cache_key)
if res in (True, False):
return res
+
if type(right_name) in (list, tuple):
res = bool(self.person_types.filter(
txt_idx__in=right_name).count()) or \