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

ensure product/category pairs never have NULL categories #7818

Merged
merged 1 commit into from
Nov 9, 2021

Conversation

Pomax
Copy link
Contributor

@Pomax Pomax commented Nov 9, 2021

Closes #7814
Reverts #7776

This change updates the ProductPageCategory model (which represents a (product <-> category) many-to-many relation) so that if a category is deleted, any ProductPageCategory that uses that category is deleted, too, with a migration that explicitly deletes all currently extant ProductPageCategory instances with a category set to None (there are 171 entries in the production database for this at the time of writing this PR).

Verifying the problem

Testing the solution

@mofodevops mofodevops temporarily deployed to foundation-s-fix-catego-ocnx9c November 9, 2021 19:36 Inactive
Copy link
Collaborator

@danielfmiranda danielfmiranda left a comment

Choose a reason for hiding this comment

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

Hi Pomax! Just tested this out following the instructions provided and can confirm that it works great! Approving 👍

@MozillaFoundation MozillaFoundation deleted a comment from github-actions bot Nov 9, 2021
@Pomax Pomax removed the request for review from TheoChevalier November 9, 2021 20:39
@Pomax Pomax merged commit 225b198 into main Nov 9, 2021
@Pomax Pomax deleted the fix-category-deletion branch November 9, 2021 20:39
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.

Some PNI product pages are crashing
3 participants