From 3c1d3bbcb28c8acf1f23043c27723d04a290104a Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Mon, 3 Feb 2014 08:54:37 +0000 Subject: [PATCH] update item sort after adding document to item, fixes #2153 --- pandora/document/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pandora/document/models.py b/pandora/document/models.py index 1e8ae837..1bb1dab1 100644 --- a/pandora/document/models.py +++ b/pandora/document/models.py @@ -84,6 +84,7 @@ class Document(models.Model): p.index = ItemProperties.objects.filter(item=item).aggregate(Max('index'))['index__max'] + 1 p.save() p.document.update_matches() + item.update_sort() def remove(self, item): ItemProperties.objects.filter(item=item, document=self).delete()