fix items without sort

This commit is contained in:
j 2019-12-19 21:14:46 +02:00
parent 3e46dc78cb
commit 246413027c

View file

@ -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()