# Fixes bug

* fixes bug described in #331
pull/332/head
mpeltriaux 1 year ago
parent 4987d0b90d
commit 204cbe2a78

@ -79,8 +79,6 @@ class AbstractEditDeductionView(AbstractDeductionView):
self._custom_check(obj)
try:
eco_deduction = obj.deductions.get(id=deduction_id)
if not eco_deduction.intervention.is_shared_with(request.user):
raise ObjectDoesNotExist
except ObjectDoesNotExist:
raise Http404(DEDUCTION_UNKNOWN)
@ -119,8 +117,6 @@ class AbstractRemoveDeductionView(AbstractDeductionView):
self._custom_check(obj)
try:
eco_deduction = obj.deductions.get(id=deduction_id)
if not eco_deduction.intervention.is_shared_with(request.user):
raise ObjectDoesNotExist()
except ObjectDoesNotExist:
raise Http404(DEDUCTION_UNKNOWN)
form = RemoveEcoAccountDeductionModalForm(request.POST or None, instance=obj, deduction=eco_deduction,

Loading…
Cancel
Save