Skip to content

Fix edge case in initiative creation#10723

Merged
ahukkanen merged 4 commits intodevelopfrom
fix/initiatives-login
Apr 19, 2023
Merged

Fix edge case in initiative creation#10723
ahukkanen merged 4 commits intodevelopfrom
fix/initiatives-login

Conversation

@alecslupu
Copy link
Copy Markdown
Contributor

🎩 What? Why?

There is an edge case in the initiatives wizard, when having a single initiative type available, and the user's session expires, then the initiative wizard will throw an 500 error, instead of redirecting the user to login.

This issues has been found while working on #10467

Testing

  1. Login as a user
  2. Go to Initiatives , click "New Initiative"
  3. Start filling your form
  4. When passing to the next window ( validate the form)
  5. Open the console and remove the session cookies
  6. On refresh you should get a 500 error on an url like /create_initiative/fill_data
  7. Apply the patch
  8. See there is no error on refresh ( you should be redirected to login screen)

♥️ Thank you!

@alecslupu alecslupu requested a review from a team April 14, 2023 18:28
@alecslupu alecslupu added module: initiatives type: fix PRs that implement a fix for a bug labels Apr 14, 2023
@alecslupu alecslupu force-pushed the fix/initiatives-login branch from fb4e029 to 0c78597 Compare April 14, 2023 18:30
Copy link
Copy Markdown
Contributor

@ahukkanen ahukkanen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix works as described for the case described in the PR description.

However, if I login again and go to the URL /create_initiative/fill_data, I still get the same 500 error that was there before.

@alecslupu alecslupu requested a review from ahukkanen April 18, 2023 12:32
Copy link
Copy Markdown
Contributor

@ahukkanen ahukkanen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: initiatives type: fix PRs that implement a fix for a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants