diff options
Diffstat (limited to 'archaeological_finds/models_treatments.py')
-rw-r--r-- | archaeological_finds/models_treatments.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/archaeological_finds/models_treatments.py b/archaeological_finds/models_treatments.py index cbca04c9a..d23843226 100644 --- a/archaeological_finds/models_treatments.py +++ b/archaeological_finds/models_treatments.py @@ -22,14 +22,14 @@ import datetime from django.conf import settings from django.contrib.gis.db import models from django.contrib.postgres.indexes import GinIndex -from django.db import transaction from django.db.models import Max, Q from django.db.models.signals import post_save, post_delete, pre_delete, m2m_changed from django.template.defaultfilters import slugify from django.urls import reverse from ishtar_common.utils import ugettext_lazy as _, pgettext_lazy, SheetItem -from archaeological_finds.models_finds import Find, FindBasket, TreatmentType, FindTreatment +from archaeological_finds.models_finds import Find, FindBasket, TreatmentType, \ + FindTreatment from archaeological_operations.models import ClosedItem, Operation from archaeological_context_records.models import Dating from archaeological_warehouse.models import Warehouse, Container @@ -413,7 +413,7 @@ class Treatment( def get_extra_actions(self, request): # url, base_text, icon, extra_text, extra css class, is a quick action actions = super(Treatment, self).get_extra_actions(request) - if self.can_do(request, "add_administrativeact"): + if self.can_do(request, "archaeological_operations.add_administrativeact"): actions += [ ( reverse("treatment-add-adminact", args=[self.pk]), @@ -1309,7 +1309,7 @@ class TreatmentFile( def get_extra_actions(self, request): # url, base_text, icon, extra_text, extra css class, is a quick action actions = super(TreatmentFile, self).get_extra_actions(request) - if self.can_do(request, "add_administrativeact"): + if self.can_do(request, "archaeological_operations.add_administrativeact"): actions += [ ( reverse("treatmentfile-add-adminact", args=[self.pk]), @@ -1330,7 +1330,7 @@ class TreatmentFile( ): # a treatment of this type already exists return actions - can_edit_find = self.can_do(request, "change_find") + can_edit_find = self.can_do(request, "archaeological_finds.change_find") if can_edit_find: actions += [ ( |