diff --git a/app/models.py b/app/models.py index 5b86fa28..470e5c6a 100644 --- a/app/models.py +++ b/app/models.py @@ -422,6 +422,7 @@ class CorpusFile(db.Model): except: logger.warning('[ERROR] CorpusFile.delete') return + self.corpus.status = 'unprepared' db.session.delete(self) db.session.commit() @@ -435,6 +436,8 @@ class CorpusFile(db.Model): text_node.set('publishing_year', str(self.publishing_year)) text_node.set('title', self.title) element_tree.write(file) + self.corpus.status = 'unprepared' + db.session.commit() class Corpus(db.Model):