avoid saving item twice

This commit is contained in:
j 2016-06-26 23:22:27 +02:00
parent de9b062d63
commit 0f9e80e1e6

View file

@ -136,10 +136,7 @@ def extract_stream(fileId):
stream.extract_derivatives() stream.extract_derivatives()
# get current version from db # get current version from db
file = models.File.objects.get(id=fileId) file = models.File.objects.get(id=fileId)
if not file.item.rendered:
file.item.update_timeline() file.item.update_timeline()
if file.item.rendered:
file.item.save()
file.extract_tracks() file.extract_tracks()
models.File.objects.filter(id=fileId).update(encoding=False) models.File.objects.filter(id=fileId).update(encoding=False)