Skip to content

Commit

Permalink
job_seekers_views: force the presence of session_kind in session
Browse files Browse the repository at this point in the history
It was facultative for the sake of deployment.
  • Loading branch information
EwenKorr committed Jan 23, 2025
1 parent 94aa80c commit e60c507
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions itou/www/job_seekers_views/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,8 @@ def setup(self, request, *args, session_uuid, **kwargs):
if not self.job_seeker_session.exists():
raise Http404
# Ensure we are performing the action (update, create…) the session was created for.
if (
session_kind := self.job_seeker_session.get("config").get("session_kind")
) and session_kind != self.EXPECTED_SESSION_KIND:
session_kind = self.job_seeker_session.get("config", {}).get("session_kind")
if session_kind != self.EXPECTED_SESSION_KIND:
raise Http404

super().setup(request, *args, **kwargs)
Expand Down

0 comments on commit e60c507

Please sign in to comment.