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

Refs #27852 -- Fixed object deletion to show all restricted related objects rather than just the first one. #12376

Merged
merged 2 commits into from Jan 29, 2020

Conversation

hramezani
Copy link
Member

Fix for the comment about restricted objects on ticket 27852.

@@ -175,7 +186,7 @@ def test_restrict_path_cascade_indirect(self):
a.restrict.save()
msg = (
"Cannot delete some instances of model 'R' because they are "
"referenced through a restricted foreign key: 'A.restrict'."
"referenced through restricted foreign keys: 'A.restrict'."
Copy link
Member

Choose a reason for hiding this comment

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

Previous message was incorrect, IMO. We tried to delete a P instance so we should get a message about P even if restricted foreign keys are from other models (R in this case). Restricted foreign keys can be reached from a long and complicated paths so I don't think we can do much to improve this message.

@felixxm
Copy link
Member

felixxm commented Jan 28, 2020

@hramezani Thanks 👍 I pushed minor edits.

@felixxm felixxm merged commit 4ca5c56 into django:master Jan 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants