year db is only 4 chars long

This commit is contained in:
j 2019-12-01 01:20:58 +01:00
parent f311062b5a
commit 2f7e8a0780

View file

@ -1047,7 +1047,7 @@ class Item(models.Model):
value = len(value) value = len(value)
set_value(s, name, value) set_value(s, name, value)
elif sort_type == 'year': elif sort_type == 'year':
value = self.get(source) value = self.get(source)[:4]
set_value(s, name, value) set_value(s, name, value)
elif sort_type == 'date': elif sort_type == 'date':
value = value_ = self.get(source) value = value_ = self.get(source)