always record edititem
This commit is contained in:
parent
54d6d43fab
commit
4ad2fbf698
1 changed files with 1 additions and 4 deletions
|
@ -394,11 +394,9 @@ class Item(db.Model):
|
||||||
fd.write(content)
|
fd.write(content)
|
||||||
f.info = media.metadata(path)
|
f.info = media.metadata(path)
|
||||||
f.save()
|
f.save()
|
||||||
edititem = False
|
|
||||||
for key in ('tableofcontents', ):
|
for key in ('tableofcontents', ):
|
||||||
if key not in self.meta and key in f.info:
|
if key not in self.meta and key in f.info:
|
||||||
self.meta[key] = f.info[key]
|
self.meta[key] = f.info[key]
|
||||||
edititem = True
|
|
||||||
if u not in self.users:
|
if u not in self.users:
|
||||||
self.add_user(u)
|
self.add_user(u)
|
||||||
t = Transfer.get_or_create(self.id)
|
t = Transfer.get_or_create(self.id)
|
||||||
|
@ -406,8 +404,7 @@ class Item(db.Model):
|
||||||
t.save()
|
t.save()
|
||||||
self.added = datetime.utcnow()
|
self.added = datetime.utcnow()
|
||||||
Changelog.record(u, 'additem', self.id, f.info)
|
Changelog.record(u, 'additem', self.id, f.info)
|
||||||
if edititem:
|
Changelog.record(u, 'edititem', self.id, self.meta)
|
||||||
Changelog.record(u, 'edititem', self.id, self.meta)
|
|
||||||
self.update()
|
self.update()
|
||||||
f.move()
|
f.move()
|
||||||
self.update_icons()
|
self.update_icons()
|
||||||
|
|
Loading…
Reference in a new issue