mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #30259 -- Fixed crash of admin views when properties don't have admin_order_field attribute.
This commit is contained in:
@@ -60,6 +60,10 @@ class Article(models.Model):
|
||||
property_year.admin_order_field = 'date'
|
||||
model_property_year = property(property_year)
|
||||
|
||||
@property
|
||||
def model_month(self):
|
||||
return self.date.month
|
||||
|
||||
|
||||
class Book(models.Model):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user