Skip to content

Conversation

@ben-beauhurst
Copy link
Contributor

@ben-beauhurst ben-beauhurst commented Sep 15, 2025

Added a check for instance._state.adding to instance_pre_save as checking not instance.pk is insufficient. In cases involving concrete model inheritance it can have a PK set but not be saved in the DB yet, which will call this to fail.

…king not instance.pk is insufficient. It can have a PK but not be saved in the DB yet, which will call this to fail.
Copy link
Contributor

@claudep claudep left a comment

Choose a reason for hiding this comment

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

LGTM

@claudep claudep merged commit f927ea2 into DjangoAdminHackers:master Sep 15, 2025
12 of 13 checks passed
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.

2 participants