update items

This commit is contained in:
j 2023-10-21 15:46:08 +01:00
parent 215f0db071
commit c1c7fc27d3

View file

@ -19,6 +19,11 @@ def upgrade_originals():
def remove_deselected_files():
il = itemlist.models.List.objects.get(name='New Originals')
for i in il.items.all():
changed = False
for f in i.files.filter(selected=False):
f.data.delete()
f.delete()
changed = True
if changed:
i.save()