From 1a3edf4f93e14a01fc6f77452e8f6b48ccd7e86f Mon Sep 17 00:00:00 2001 From: j Date: Thu, 15 Feb 2018 15:57:12 +0100 Subject: [PATCH] sort by document name --- pandora/entity/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora/entity/models.py b/pandora/entity/models.py index 2f70dea6..40a343ca 100644 --- a/pandora/entity/models.py +++ b/pandora/entity/models.py @@ -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