Fixed #35301 -- Fixed Options._property_names for overriden properties.

Regression in faeb92ea13.
This commit is contained in:
Adam Johnson 2024-03-17 08:43:04 +00:00 committed by GitHub
parent b07e2d57a0
commit 7646b9023d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 14 additions and 1 deletions

View file

@ -1343,6 +1343,17 @@ class OtherModelTests(SimpleTestCase):
],
)
def test_inherited_overriden_property_no_clash(self):
class Cheese:
@property
def filling_id(self):
pass
class Sandwich(Cheese, models.Model):
filling = models.ForeignKey("self", models.CASCADE)
self.assertEqual(Sandwich.check(), [])
def test_single_primary_key(self):
class Model(models.Model):
foo = models.IntegerField(primary_key=True)