mirror of
https://github.com/django/django.git
synced 2025-08-31 15:57:45 +00:00
Fixed #32733 -- Skipped system check for specifying type of auto-created primary keys on abstract models.
Regression in b5e12d490a
.
This commit is contained in:
parent
f07723aa0a
commit
a24fed399c
3 changed files with 12 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue