1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

Fixed #32863 -- Skipped system check for specifying type of auto-created primary keys on models with invalid app_label.

Regression in b5e12d490a.

Thanks Iuri de Silvio for the report.
This commit is contained in:
Hasan Ramezani
2021-06-21 16:57:06 +02:00
committed by Mariusz Felisiak
parent 1697098795
commit 7a9745fed4
3 changed files with 11 additions and 0 deletions

View File

@@ -403,6 +403,13 @@ class ModelDefaultAutoFieldTests(SimpleTestCase):
self.assertEqual(checks.run_checks(app_configs=self.apps.get_app_configs()), [])
def test_skipped_on_model_with_invalid_app_label(self):
class Model(models.Model):
class Meta:
app_label = 'invalid_app_label'
self.assertEqual(Model.check(), [])
def test_skipped_on_abstract_model(self):
class Abstract(models.Model):
class Meta: