sort by document name

This commit is contained in:
j 2018-02-15 15:57:12 +01:00
parent a73b9f5600
commit 1a3edf4f93
1 changed files with 1 additions and 1 deletions

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