dont include emtpy annotations in srt export

This commit is contained in:
j 2015-11-20 18:19:55 +01:00
parent 2b3853c7aa
commit 8f6f39caaf

View file

@ -1617,7 +1617,7 @@ class Item(models.Model):
value = value.replace('<br/>', '<br>').replace('<br>\n', '\n').replace('<br>', '\n')
value = value.replace('\n\n', '<br>\n')
return value
annotations = self.annotations.filter(layer=layer)
annotations = self.annotations.filter(layer=layer).exclude(value='')
if language:
annotations = annotations.filter(languages__contains=language)
return ox.srt.encode([{