summaryrefslogtreecommitdiff
path: root/archaeological_finds/models_treatments.py
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_finds/models_treatments.py')
-rw-r--r--archaeological_finds/models_treatments.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/archaeological_finds/models_treatments.py b/archaeological_finds/models_treatments.py
index 5dacb72f8..cfde9b036 100644
--- a/archaeological_finds/models_treatments.py
+++ b/archaeological_finds/models_treatments.py
@@ -167,9 +167,9 @@ class Treatment(DashboardFormItem, ValueGetter, BaseHistorizedItem,
return _(u"TREATMENT")
@classmethod
- def get_query_owns(cls, user):
- return (Q(history_creator=user) |
- Q(person__ishtaruser=user.ishtaruser)) \
+ def get_query_owns(cls, ishtaruser):
+ return (Q(history_creator=ishtaruser.user_ptr) |
+ Q(person__ishtaruser=ishtaruser)) \
& Q(end_date__isnull=True)
@classmethod
@@ -542,9 +542,9 @@ class TreatmentFile(DashboardFormItem, ClosedItem, BaseHistorizedItem,
return _(u"Treatment request")
@classmethod
- def get_query_owns(cls, user):
- return (Q(history_creator=user) |
- Q(in_charge__ishtaruser=user.ishtaruser)) \
+ def get_query_owns(cls, ishtaruser):
+ return (Q(history_creator=ishtaruser.user_ptr) |
+ Q(in_charge__ishtaruser=ishtaruser)) \
& Q(end_date__isnull=True)
@property