fix index

This commit is contained in:
j 2016-02-20 01:09:31 +05:30
parent 09ac3c32b0
commit 29c6dc866b
1 changed files with 1 additions and 1 deletions

View File

@ -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: