summaryrefslogtreecommitdiff
path: root/archaeological_files/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_files/models.py')
-rw-r--r--archaeological_files/models.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/archaeological_files/models.py b/archaeological_files/models.py
index 222c7b700..1f164c30d 100644
--- a/archaeological_files/models.py
+++ b/archaeological_files/models.py
@@ -27,12 +27,13 @@ from django.contrib.gis.db import models
from django.contrib.postgres.indexes import GinIndex
from django.core.cache import cache
from django.core.validators import MinValueValidator, MaxValueValidator
-from django.db.models import Q, Count, Sum, Max
+from django.db.models import Max
from django.db.models.signals import post_save, m2m_changed, post_delete
from django.urls import reverse
from ishtar_common.models_common import OrderedHierarchicalType
-from ishtar_common.utils import ugettext_lazy as _, pgettext_lazy, get_current_profile, InlineClass
+from ishtar_common.utils import ugettext_lazy as _, pgettext_lazy, get_current_profile, \
+ InlineClass
from ishtar_common.utils import (
cached_label_changed,
@@ -1548,7 +1549,7 @@ class File(
def get_extra_actions(self, request):
# url, base_text, icon, extra_text, extra css class, is a quick action
actions = super(File, self).get_extra_actions(request)
- if self.can_do(request, "change_operation"):
+ if self.can_do(request, "archaeological_files.change_file"):
actions += [
(
reverse("file-parcels-modify", args=[self.pk]),
@@ -1571,7 +1572,7 @@ class File(
False,
),
]
- if self.can_do(request, "add_administrativeact"):
+ if self.can_do(request, "archaeological_operations.add_administrativeact"):
actions += [
(
reverse("file-add-adminact", args=[self.pk]),
@@ -1582,7 +1583,7 @@ class File(
False,
),
]
- if self.can_do(request, "add_operation"):
+ if self.can_do(request, "archaeological_operations.add_operation"):
actions += [
(
reverse("file-add-operation", args=[self.pk]),