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

Fixed #33008 -- Fixed prefetch_related() for deleted GenericForeignKeys. #14762

Merged
merged 1 commit into from Oct 14, 2021

Conversation

martinsvoboda
Copy link
Contributor

Patch for #33008 issue. prefetch_related don't set content_type_id and object_id to None, if GFK object is not found.

@felixxm felixxm changed the title #33008 - unify prefetch_related behaviour for GFK deleted object Fixed #33008 -- Fixed prefetch_related() for deleted GenericForeignKeys. Oct 14, 2021
Copy link
Member

@felixxm felixxm left a comment

Choose a reason for hiding this comment

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

@martinsvoboda Thanks for this patch 👍 Welcome aboard ⛵

I squashed commits and switched AuditLog to Post in tests.

tests/contenttypes_tests/models.py Outdated Show resolved Hide resolved
@felixxm felixxm force-pushed the fix-deleted-obj-gfk branch 2 times, most recently from 2e0935c to 84cfa2a Compare October 14, 2021 05:54
Thanks Simon Charette for the implementation idea.
@felixxm felixxm merged commit cc4cb95 into django:main Oct 14, 2021
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