sort by document name

This commit is contained in:
j 2018-02-15 15:57:12 +01:00
parent a73b9f5600
commit 1a3edf4f93

View file

@ -174,7 +174,7 @@ class Entity(models.Model):
response[key] = self.name_sort
elif key == 'documents':
response[key] = [ox.toAZ(id_)
for id_, in self.documentproperties.order_by('index').values_list('document_id')]
for id_, in self.documentproperties.order_by('document__name_sort').values_list('document_id')]
elif key in self.data:
response[key] = self.data[key]
return response