1
0
mirror of https://github.com/django/django.git synced 2025-10-28 08:06:09 +00:00

[3.2.x] Fixed #32733 -- Skipped system check for specifying type of auto-created primary keys on abstract models.

Regression in b5e12d490a.

Backport of a24fed399c from main
This commit is contained in:
Rust Saiargaliev
2021-05-10 22:19:29 +02:00
committed by Mariusz Felisiak
parent 65b680a99a
commit 349bb58b8a
3 changed files with 12 additions and 0 deletions

View File

@@ -403,6 +403,14 @@ class ModelDefaultAutoFieldTests(SimpleTestCase):
self.assertEqual(checks.run_checks(app_configs=self.apps.get_app_configs()), [])
def test_skipped_on_abstract_model(self):
class Abstract(models.Model):
class Meta:
abstract = True
# Call .check() because abstract models are not registered.
self.assertEqual(Abstract.check(), [])
def test_explicit_inherited_parent_link(self):
class Parent(models.Model):
id = models.AutoField(primary_key=True)