From 29c6dc866b3dfcdd7d5070111dde023061e67462 Mon Sep 17 00:00:00 2001 From: j Date: Sat, 20 Feb 2016 01:09:31 +0530 Subject: [PATCH] fix index --- pandora/itemlist/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora/itemlist/models.py b/pandora/itemlist/models.py index c387468c..e869874a 100644 --- a/pandora/itemlist/models.py +++ b/pandora/itemlist/models.py @@ -85,7 +85,7 @@ class List(models.Model): l = ListItem() l.list = self l.item = item - l.index = ListItem.objects.filter(item=self).aggregate(Max('index'))['index__max'] + l.index = ListItem.objects.filter(list=self).aggregate(Max('index'))['index__max'] if l.index == None: l.index = 0 else: