commit_unless_managed/commit

This commit is contained in:
j 2016-04-01 19:34:55 +02:00
parent 61d599f727
commit 86660409b9

View file

@ -36,7 +36,7 @@ def update_double_imdb():
item.models.Item.objects.filter(sort__imdbId=i.sort.imdbId).count() == 1: item.models.Item.objects.filter(sort__imdbId=i.sort.imdbId).count() == 1:
l.remove(i) l.remove(i)
transaction.commit_unless_managed() transaction.commit()
def update_keywords(): def update_keywords():
t = text.models.Text.get('j:Keywords') t = text.models.Text.get('j:Keywords')
@ -66,4 +66,4 @@ def update_queued():
for i in l.items.all(): for i in l.items.all():
if not i.files.filter(encoding=True).exists(): if not i.files.filter(encoding=True).exists():
l.remove(i) l.remove(i)
transaction.commit_unless_managed() transaction.commit()