update items
This commit is contained in:
parent
215f0db071
commit
c1c7fc27d3
1 changed files with 5 additions and 0 deletions
5
utils.py
5
utils.py
|
@ -19,6 +19,11 @@ def upgrade_originals():
|
||||||
def remove_deselected_files():
|
def remove_deselected_files():
|
||||||
il = itemlist.models.List.objects.get(name='New Originals')
|
il = itemlist.models.List.objects.get(name='New Originals')
|
||||||
for i in il.items.all():
|
for i in il.items.all():
|
||||||
|
changed = False
|
||||||
for f in i.files.filter(selected=False):
|
for f in i.files.filter(selected=False):
|
||||||
f.data.delete()
|
f.data.delete()
|
||||||
f.delete()
|
f.delete()
|
||||||
|
changed = True
|
||||||
|
if changed:
|
||||||
|
i.save()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue