# RecordModalForm refactored

* refactors AbstractRecordModalForm
* refactors recording view for ema, intervention and eco account
This commit is contained in:
2025-10-20 16:29:50 +02:00
parent 97fbe02742
commit a7b23935a1
5 changed files with 29 additions and 71 deletions

View File

@@ -5,19 +5,12 @@ Contact: ksp-servicestelle@sgdnord.rlp.de
Created on: 19.08.22
"""
from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from django.contrib.auth.mixins import LoginRequiredMixin
from intervention.models import Intervention
from konova.decorators import conservation_office_group_required, shared_access_required
from konova.views.record import AbstractRecordView
class InterventionRecordView(AbstractRecordView):
model = Intervention
@method_decorator(login_required)
@method_decorator(conservation_office_group_required)
@method_decorator(shared_access_required(Intervention, "id"))
def dispatch(self, request, *args, **kwargs):
return super().dispatch(request, *args, **kwargs)
class InterventionRecordView(LoginRequiredMixin, AbstractRecordView):
_MODEL_CLS = Intervention
_REDIRECT_URL = "intervention:detail"