Skip to content

Commit

Permalink
also remove steps data in csrf way
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastienReuiller committed Oct 10, 2023
1 parent a8f4c33 commit 638359c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lemarche/www/pages/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from lemarche.sectors.models import Sector
from lemarche.siaes.models import Siae, SiaeGroup
from lemarche.tenders import constants as tender_constants
from lemarche.tenders.models import Tender
from lemarche.tenders.models import Tender, TenderStepsData
from lemarche.users.models import User
from lemarche.utils.tracker import track
from lemarche.www.pages.forms import (
Expand Down Expand Up @@ -357,6 +357,11 @@ def csrf_failure(request, reason=""): # noqa C901
tender.save()
tender.set_siae_found_list()

# remove steps data
uuid = request.session.get("tender_steps_data_uuid", None)
if uuid:
TenderStepsData.objects.filter(uuid=uuid).delete()

if settings.BITOUBI_ENV == "prod":
notify_admin_tender_created(tender)

Expand Down

0 comments on commit 638359c

Please sign in to comment.