# Fixes bug #332

Merged
mpeltriaux merged 1 commits from 331_Deductions_of_unshared_interventions_not_changeable into master 2023-05-16 14:10:59 +02:00
Showing only changes of commit 204cbe2a78 - Show all commits

View File

@ -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,