parent
4987d0b90d
commit
204cbe2a78
@ -79,8 +79,6 @@ class AbstractEditDeductionView(AbstractDeductionView):
|
|||||||
self._custom_check(obj)
|
self._custom_check(obj)
|
||||||
try:
|
try:
|
||||||
eco_deduction = obj.deductions.get(id=deduction_id)
|
eco_deduction = obj.deductions.get(id=deduction_id)
|
||||||
if not eco_deduction.intervention.is_shared_with(request.user):
|
|
||||||
raise ObjectDoesNotExist
|
|
||||||
except ObjectDoesNotExist:
|
except ObjectDoesNotExist:
|
||||||
raise Http404(DEDUCTION_UNKNOWN)
|
raise Http404(DEDUCTION_UNKNOWN)
|
||||||
|
|
||||||
@ -119,8 +117,6 @@ class AbstractRemoveDeductionView(AbstractDeductionView):
|
|||||||
self._custom_check(obj)
|
self._custom_check(obj)
|
||||||
try:
|
try:
|
||||||
eco_deduction = obj.deductions.get(id=deduction_id)
|
eco_deduction = obj.deductions.get(id=deduction_id)
|
||||||
if not eco_deduction.intervention.is_shared_with(request.user):
|
|
||||||
raise ObjectDoesNotExist()
|
|
||||||
except ObjectDoesNotExist:
|
except ObjectDoesNotExist:
|
||||||
raise Http404(DEDUCTION_UNKNOWN)
|
raise Http404(DEDUCTION_UNKNOWN)
|
||||||
form = RemoveEcoAccountDeductionModalForm(request.POST or None, instance=obj, deduction=eco_deduction,
|
form = RemoveEcoAccountDeductionModalForm(request.POST or None, instance=obj, deduction=eco_deduction,
|
||||||
|
Loading…
Reference in New Issue
Block a user