This commit is contained in:
j 2017-06-09 15:07:08 +02:00
parent 9bdecf715e
commit 3ce08c76d6

7
fixdata.py Normal file
View file

@ -0,0 +1,7 @@
from item.models import Item
def fix_topic(old, new):
for i in Item.objects.all():
if old in i.data.get('topics', []):
i.data['topics'] = [new if t == old else t for t in i.data['topics']]
i.save()