diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-06-13 17:36:56 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-06-13 17:53:21 +0200 |
commit | 60603ad6431d2bdcb0786a2e51d13276b5a16677 (patch) | |
tree | 8be0e26058cd784bf19612b3fe2a9945a985f98a /archaeological_operations/views.py | |
parent | e8b6b433704e1eaae34f5100f3590a7950ddce5e (diff) | |
download | Ishtar-60603ad6431d2bdcb0786a2e51d13276b5a16677.tar.bz2 Ishtar-60603ad6431d2bdcb0786a2e51d13276b5a16677.zip |
🐛 archaeological sites: remove "add operation" shortcuts (refs #6329)
Diffstat (limited to 'archaeological_operations/views.py')
-rw-r--r-- | archaeological_operations/views.py | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/archaeological_operations/views.py b/archaeological_operations/views.py index bca85ef44..191e5c0f4 100644 --- a/archaeological_operations/views.py +++ b/archaeological_operations/views.py @@ -749,51 +749,6 @@ def site_delete(request, pk): return redirect(reverse(wizard_url, kwargs={"step": "final-" + wizard_url})) -def site_add_operation(request, pks, current_right=None): - pks = [int(p) for p in pks.split("-")] - for pk in pks: - q = models.ArchaeologicalSite.objects.filter(pk=pk) - if not q.count(): - raise Http404() - site = q.all()[0] - if not site.can_do(request, "view", app="archaeological_operations", - model_name="archaeologicalsite") \ - or site.operations.count(): - raise Http404() - # operation add permission checked on view call - operation_creation_wizard(request) - wizards.OperationWizard.session_set_value( - request, "general-operation_creation", "archaeological_site", pks, - reset=True - ) - return redirect( - reverse("operation_creation", kwargs={"step": "general-operation_creation"}) - ) - - -def site_add_top_operation(request, pks, current_right=None): - q = models.ArchaeologicalSite.objects.filter(pk=pks) - if not q.count(): - raise Http404() - site = q.all()[0] - if not site.can_do(request, "view", app="archaeological_operations", - model_name="archaeologicalsite") \ - or not site.operations.count(): - raise Http404() - # operation add permission checked on view call - top_operation = site.create_or_update_top_operation(create=True) - if not wizard_is_available( - operation_modification_wizard, request, models.Operation, top_operation.pk - ): - return HttpResponseRedirect("/") - - wizard_url = "operation_modification" - wizards.OperationModificationWizard.session_set_value( - request, "selec-" + wizard_url, "pk", top_operation.pk, reset=True - ) - return redirect(reverse(wizard_url, kwargs={"step": "general-" + wizard_url})) - - operation_administrativeactop_search_wizard = wizards.SearchWizard.as_view( [ ( |