django__django-12453
`TransactionTestCase.serialized_rollback` fails to restore objects due to ordering constraints
Verdict: the fix is stated in the issue (Tier A).
I'm suggesting to fix it as follows: diff --git a/django/db/backends/base/creation.py b/django/db/backends/base/creation.py index bca8376..7bed2be 100644 --- a/django/db/backends/base/creation.py +++ b/django/db/backends/base/creation.py @@ -4,7 +4,7 @@ import time from django.apps import apps from django.conf import settings from django.core import serializers -from django.db import router +from django.db import router, transaction
The text states the fix: “I'm suggesting to fix it as follows: diff --git a/django/db/backends/base/creation.py b/django/db/backends/base/creation.py index bca8376..7bed2be 100644 --- a/django/db…”
All SWE-bench Lite tasks · more django/django tasks · How the check works