diff --git a/apps/assets/backends/base.py b/apps/assets/backends/base.py index d46c67f70..9c9f7ca1e 100644 --- a/apps/assets/backends/base.py +++ b/apps/assets/backends/base.py @@ -43,7 +43,7 @@ class AssetUserQuerySet(list): else: in_kwargs[k] = v for k in in_kwargs: - kwargs.pop(k) + kwargs.pop(k, None) if len(in_kwargs) == 0: return self @@ -56,7 +56,7 @@ class AssetUserQuerySet(list): v = [str(i) for i in v] if isinstance(attr, uuid.UUID): attr = str(attr) - if v in attr: + if attr in v: matched = True if matched: queryset.append(i) @@ -68,11 +68,12 @@ class AssetUserQuerySet(list): real = [] for k, v in kwargs.items(): wanted.append(v) - value = getattr(obj, k) + value = getattr(obj, k, None) if isinstance(value, uuid.UUID): value = str(value) real.append(value) return wanted == real + kwargs = {k: v for k, v in kwargs.items() if k.find('__in') == -1} if len(kwargs) > 0: queryset = AssetUserQuerySet([i for i in self if filter_it(i)]) else: diff --git a/apps/assets/templates/assets/_asset_update_modal.html b/apps/assets/templates/assets/_asset_update_modal.html deleted file mode 100644 index 68b2ff8db..000000000 --- a/apps/assets/templates/assets/_asset_update_modal.html +++ /dev/null @@ -1,4 +0,0 @@ -{% extends '_update_modal.html' %} -{% load i18n %} - -{% block modal_title%}{% trans "Update assets" %}{% endblock %} diff --git a/apps/templates/_import_modal.html b/apps/templates/_import_modal.html deleted file mode 100644 index 9211bdcb9..000000000 --- a/apps/templates/_import_modal.html +++ /dev/null @@ -1,28 +0,0 @@ -{% extends '_modal.html' %} -{% load i18n %} - -{% block modal_id %}import_modal{% endblock %} - -{% block modal_confirm_id %}btn_import_confirm{% endblock %} - -{% block modal_body %} -
- -