Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix KeyError 'changes_to_release_date' #26

Merged
merged 4 commits into from
Nov 18, 2024

Conversation

zerolab
Copy link
Contributor

@zerolab zerolab commented Nov 15, 2024

Cannot quite reproduce in tests nor locally. Follow up to #16

What is the context of this PR?

Sentry issue screenshot Screenshot 2024-11-15 at 12 45 56

How to review

Just review the code.

Follow-up Actions

Monitor Sentry and follow up with any other tweaks.

Cannot quite reproduce in tests nor locally
@zerolab zerolab requested a review from a team as a code owner November 15, 2024 12:54
@sanjeevz3009 sanjeevz3009 self-requested a review November 15, 2024 15:35
Copy link
Contributor

@MebinAbraham MebinAbraham left a comment

Choose a reason for hiding this comment

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

Do we need to enforce using .get on cleaned_data. When can we expect the keys to be populated, I'm seeing inconsistent behaviour of it sometimes existing. While testing this, I got a KeyError on status key https://github.com/ONSdigital/dis-wagtail/pull/26/files#diff-97e098c994ca593ce24412351be5632c9b77fdf54cc70d6f184c45020644d481R29

To recreate:

  • Add a release calendar entry with title, summary and status Provisional then Save draft.
  • Change status to Published and click Save draft and then you should see the key error in the logs.

@zerolab
Copy link
Contributor Author

zerolab commented Nov 18, 2024

@MebinAbraham done da53e25.
I was able to replicate your use case, and that is only if the preview pane is open. Tested with a few other variations and I think all is covered.

Added to the list to investigate in Wagtail core.

@zerolab zerolab merged commit ac4b8af into main Nov 18, 2024
7 checks passed
@zerolab zerolab deleted the chore/tidy-up-release-calendar-form-validation branch November 18, 2024 11:04
nehakerung pushed a commit that referenced this pull request Nov 18, 2024
* Fix `KeyError 'changes_to_release_date'`
  Cannot quite reproduce in tests nor locally
* Fix typo in Analysis series help text
* Further tidy ups
nehakerung pushed a commit that referenced this pull request Nov 18, 2024
* Fix `KeyError 'changes_to_release_date'`
  Cannot quite reproduce in tests nor locally
* Fix typo in Analysis series help text
* Further tidy ups
nehakerung pushed a commit that referenced this pull request Nov 18, 2024
* Fix `KeyError 'changes_to_release_date'`
  Cannot quite reproduce in tests nor locally
* Fix typo in Analysis series help text
* Further tidy ups
nehakerung pushed a commit that referenced this pull request Nov 18, 2024
* Fix `KeyError 'changes_to_release_date'`
  Cannot quite reproduce in tests nor locally
* Fix typo in Analysis series help text
* Further tidy ups
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants