summaryrefslogtreecommitdiff
path: root/archaeological_operations/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_operations/models.py')
-rw-r--r--archaeological_operations/models.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py
index a074adc9a..2fafa56ed 100644
--- a/archaeological_operations/models.py
+++ b/archaeological_operations/models.py
@@ -902,7 +902,8 @@ class ArchaeologicalSite(
@classmethod
def get_owns(
- cls, user, menu_filtr=None, limit=None, values=None, get_short_menu_class=None
+ cls, user, menu_filtr=None, limit=None, values=None, get_short_menu_class=None,
+ no_auth_check=False, query=False
):
replace_query = None
if menu_filtr and "operation" in menu_filtr:
@@ -914,7 +915,11 @@ class ArchaeologicalSite(
limit=limit,
values=values,
get_short_menu_class=get_short_menu_class,
+ no_auth_check=no_auth_check,
+ query=query
)
+ if query:
+ return owns
return cls._return_get_owns(owns, values, get_short_menu_class)
def _generate_cached_label(self):
@@ -1782,7 +1787,8 @@ class Operation(
@classmethod
def get_owns(
- cls, user, menu_filtr=None, limit=None, values=None, get_short_menu_class=None
+ cls, user, menu_filtr=None, limit=None, values=None, get_short_menu_class=None,
+ no_auth_check=False, query=False
):
replace_query = None
if menu_filtr and "file" in menu_filtr:
@@ -1794,7 +1800,11 @@ class Operation(
limit=limit,
values=values,
get_short_menu_class=get_short_menu_class,
+ no_auth_check=no_auth_check,
+ query=query
)
+ if query:
+ return owns
return cls._return_get_owns(owns, values, get_short_menu_class)
def __str__(self):