Leaklens

django__django-12273

Resetting primary key for a child model doesn't work.

Verdict: the issue text repeats lines of the gold patch (Tier C).

def _set_pk_val(self, value): + for parent_link in self._meta.parents.values(): + setattr(self, parent_link.target_field.attname, value) return setattr(self, self._meta.pk.attname, value)

2 of 3 added patch lines appear in the issue or discussion.

All SWE-bench Verified tasks · more django/django tasks · How the check works