forked from 0x2620/pandora
fix index
This commit is contained in:
parent
09ac3c32b0
commit
29c6dc866b
1 changed files with 1 additions and 1 deletions
|
@ -85,7 +85,7 @@ class List(models.Model):
|
||||||
l = ListItem()
|
l = ListItem()
|
||||||
l.list = self
|
l.list = self
|
||||||
l.item = item
|
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:
|
if l.index == None:
|
||||||
l.index = 0
|
l.index = 0
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue