summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--archaeological_finds/forms.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/archaeological_finds/forms.py b/archaeological_finds/forms.py
index 1f81cf52f..87aaf76a9 100644
--- a/archaeological_finds/forms.py
+++ b/archaeological_finds/forms.py
@@ -787,7 +787,7 @@ class FindBasketAddItemForm(forms.Form):
def save(self, user):
try:
basket = models.FindBasket.objects.get(
- pk=self.cleaned_data['basket_id'], user=user.ishtaruser)
+ pk=self.cleaned_data['basket_id'], user=user)
item = models.Find.objects.get(
pk=self.cleaned_data['item_id'])
except models.FindBasket.DoesNotExist or\
@@ -795,9 +795,9 @@ class FindBasketAddItemForm(forms.Form):
# something strange... TODO: log it
raise PermissionDenied
# check rights
- if not user.is_superuser and \
- not user.ishtaruser.has_right('change_find') and \
- not (user.ishtaruser.has_right('change_own_find')
+ if not user.user_ptr.is_superuser and \
+ not user.has_right('change_find') and \
+ not (user.has_right('change_own_find')
and item.is_own(user)):
raise PermissionDenied
basket.items.add(item)