Skip to content

Commit

Permalink
refacto: réutiilisation d'une fonction
Browse files Browse the repository at this point in the history
  • Loading branch information
sblondon committed Oct 24, 2024
1 parent 57b7ba1 commit fade045
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions impact/reglementations/views/csrd.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,12 +546,9 @@ def gestion_csrd(request, siren=None, etape=1):
annee = datetime.now().year

if request.method == "POST":
csrd = get_object_or_404(
RapportCSRD,
entreprise=entreprise,
proprietaire=None if habilitation.is_confirmed else request.user,
annee=annee,
)
csrd = rapport_csrd(request.user, entreprise, annee)
if not csrd:
raise Http404
csrd.etape_validee = etape - 1
csrd.save()
redirect("reglementations:gestion_csrd", siren=siren, etape=etape)
Expand Down

0 comments on commit fade045

Please sign in to comment.