Resetting primary key for a child model doesn't work. Description
Resetting primary key for a child model doesn't work. Description: a task in Lego-RL-SWE-Bench-Verified (Harbor dataset). In the attached example code setting the primary key to None does not work (so that the existing object is overwritten on save()). The most important code fragments of the bug…
The task
In the attached example code setting the primary key to None does not work (so that the existing object is overwritten on save()). The most important code fragments of the bug example: from django.db import models class Item(models.Model): # uid = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)…
Part of Lego-X/Lego-RL-SWE-Bench-Verified.