diff --git a/app/models.py b/app/models.py index 2d1c11ca433aea8a428f465ae111d2372e711c81..1a857dd4b27edf3377bb50b878afa0c43a636a07 100644 --- a/app/models.py +++ b/app/models.py @@ -875,7 +875,9 @@ class Corpus(HashidMixin, db.Model): text_element.set('publishing_year', str(corpus_file.publishing_year)) # noqa text_element.set('school', corpus_file.school or 'NULL') text_element.set('title', corpus_file.title) - corpus_element.insert(1, text_element) + text_element.tail = '\n' + # corpus_element.insert(1, text_element) + corpus_element.append(text_element) ET.ElementTree(corpus_element).write( os.path.join(self.path, 'cwb', 'corpus.vrt'), encoding='utf-8'