mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-12-25 02:44:18 +00:00
Set status on upload, edit, or delete
This commit is contained in:
parent
2d4559e4fe
commit
64dce7ed28
@ -422,6 +422,7 @@ class CorpusFile(db.Model):
|
|||||||
except:
|
except:
|
||||||
logger.warning('[ERROR] CorpusFile.delete')
|
logger.warning('[ERROR] CorpusFile.delete')
|
||||||
return
|
return
|
||||||
|
self.corpus.status = 'unprepared'
|
||||||
db.session.delete(self)
|
db.session.delete(self)
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
|
|
||||||
@ -435,6 +436,8 @@ class CorpusFile(db.Model):
|
|||||||
text_node.set('publishing_year', str(self.publishing_year))
|
text_node.set('publishing_year', str(self.publishing_year))
|
||||||
text_node.set('title', self.title)
|
text_node.set('title', self.title)
|
||||||
element_tree.write(file)
|
element_tree.write(file)
|
||||||
|
self.corpus.status = 'unprepared'
|
||||||
|
db.session.commit()
|
||||||
|
|
||||||
|
|
||||||
class Corpus(db.Model):
|
class Corpus(db.Model):
|
||||||
|
Loading…
Reference in New Issue
Block a user