Skip to content
Snippets Groups Projects
Commit 64dce7ed authored by Stephan Porada's avatar Stephan Porada :speech_balloon:
Browse files

Set status on upload, edit, or delete

parent 2d4559e4
No related merge requests found
......@@ -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):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment