mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #35301 -- Fixed Options._property_names for overriden properties.
Regression in faeb92ea13.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user