Fixed #30259 -- Fixed crash of admin views when properties don't have admin_order_field attribute.

This commit is contained in:
Mariusz Felisiak 2019-04-01 15:11:54 +02:00 committed by GitHub
parent 93daed25a4
commit 7cbcf2e2cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View file

@ -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):
"""