diff options
Diffstat (limited to 'ishtar_common/backend.py')
-rw-r--r-- | ishtar_common/backend.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ishtar_common/backend.py b/ishtar_common/backend.py index 261e4dc6f..d5e092fa5 100644 --- a/ishtar_common/backend.py +++ b/ishtar_common/backend.py @@ -55,10 +55,9 @@ class ObjectPermBackend(ModelBackend): if obj is None: model_name = perm.split('_')[-1].lower() model = None - for app in apps.get_apps(): - for modl in apps.get_models(app): - if modl.__name__.lower() == model_name: - model = modl + for modl in apps.get_models(): + if modl.__name__.lower() == model_name: + model = modl if not model: return False return not is_ownperm or model.has_item_of(ishtar_user) |