﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
32370	Model._perform_unique_checks cannot properly validate simultaneous adding and changing	Roman	nobody	"Imagine there is a model with a unique field.
{{{
class Test(models.Model):
    index = models.PositiveIntegerField()
    name = models.CharField(max_length=256)

    class Meta:
        constraints = (
            models.UniqueConstraint(
                fields=('index'),
                name='%(app_label)s_%(class)s_U1'),
        )
}}}

If I have one model with values (0, ""old"") and then try to update existing model to (1, ""old"") and simultaneously add (0, ""new""), checks in Model._perform_unique_checks fail, despite there will be no constraint violation at the end of transaction."	Bug	closed	Database layer (models, ORM)	3.1	Normal	duplicate			Unreviewed	0	0	0	0	0	0
