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 #35434 -- Advised validating unfetched instances before testing result cache. #18156

Closed

Conversation

jacobtylerwalls
Copy link
Member

Trac ticket number

ticket-35434

Branch description

Clarify in the discussion of queryset caching that validating the primary key field on unfetched instances may be necessary when testing against the result cache.

Checklist

  • This PR targets the main branch.
  • The commit message is written in past tense, mentions the ticket number, and ends with a period.
  • I have checked the "Has patch" ticket flag in the Trac system.
  • I have added or updated relevant tests.
  • I have added or updated relevant docs, including release notes if applicable.
  • I have attached screenshots in both light and dark modes for any UI changes.

day=date(2020, 1, 1),
headline="Happy New Year!",
)
>>> entry2 = DailyEntry(day="2020-01-01", headline="Happy New Year!")
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not comfortable adding this to the docs because it could be seen as if this is a valid date field assignment when it's not (and it's my understanding that this is exactly Simon's point in the ticket). You could filter using the string but you should not do attribute assignment using any incorrect type.

@jacobtylerwalls jacobtylerwalls deleted the doc-validate-unfetched-pk branch May 12, 2024 00:55
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