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

Regression in b5e12d490a.
This commit is contained in:
Rust Saiargaliev 2021-05-10 22:19:29 +02:00 committed by Mariusz Felisiak
parent f07723aa0a
commit a24fed399c
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)