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 inb5e12d490a. Backport ofa24fed399cfrom main
This commit is contained in:
committed by
Mariusz Felisiak
parent
65b680a99a
commit
349bb58b8a
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user