This commit is contained in:
j 2017-06-09 15:07:39 +02:00
parent 3ce08c76d6
commit 8f4b6ec17e

View file

@ -1,7 +0,0 @@
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()