"""
Author: Michel Peltriaux
Created on: 14.12.25

"""
from django.http import HttpRequest, HttpResponse
from django.utils.decorators import method_decorator

from compensation.models import Compensation
from konova.decorators import shared_access_required
from konova.views.remove import AbstractRemoveView


class RemoveCompensationView(AbstractRemoveView):
    _MODEL = Compensation
    _REDIRECT_URL = "compensation:index"

    @method_decorator(shared_access_required(Compensation, "id"))
    def get(self, request: HttpRequest, *args, **kwargs) -> HttpResponse:
        return super().get(request, *args, **kwargs)
