fix items without sort
This commit is contained in:
parent
3e46dc78cb
commit
246413027c
1 changed files with 4 additions and 0 deletions
|
@ -107,6 +107,8 @@ class Command(BaseCommand):
|
|||
print(sql)
|
||||
cursor.execute(sql)
|
||||
transaction.commit()
|
||||
for i in models.Item.objects.filter(sort=None):
|
||||
i.save()
|
||||
if rebuild:
|
||||
print("Updating sort values...")
|
||||
ids = [i['id'] for i in models.Item.objects.all().values('id')]
|
||||
|
@ -115,3 +117,5 @@ class Command(BaseCommand):
|
|||
if options['debug']:
|
||||
print(i)
|
||||
i.update_sort()
|
||||
for i in models.Item.objects.filter(sort=None):
|
||||
i.save()
|
||||
|
|
Loading…
Reference in a new issue