Skip to content

Commit

Permalink
apply: Keep job app list filters in back_url when performing an action
Browse files Browse the repository at this point in the history
  • Loading branch information
tonial committed Sep 11, 2024
1 parent c84f803 commit 0a3d5f4
Show file tree
Hide file tree
Showing 3 changed files with 1,068 additions and 73 deletions.
6 changes: 5 additions & 1 deletion itou/www/apply/views/process_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,11 @@ def details_for_company(request, job_application_id, template_name="apply/proces
job_seeker=job_application.job_seeker, for_siae=job_application.to_company
)

back_url = get_safe_url(request, "back_url", fallback_url=reverse_lazy("apply:list_for_siae"))
# get back_url from GET params or session or fallback value
session_key = f"JOB_APP_DETAILS_FOR_COMPANY-BACK_URL-{job_application.pk}"
fallback_url = request.session.get(session_key, reverse_lazy("apply:list_for_siae"))
back_url = get_safe_url(request, "back_url", fallback_url=fallback_url)
request.session[session_key] = back_url

geiq_eligibility_diagnosis = (
job_application.to_company.kind == CompanyKind.GEIQ
Expand Down
Loading

0 comments on commit 0a3d5f4

Please sign in to comment.