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)
|
||||
f.info = media.metadata(path)
|
||||
f.save()
|
||||
edititem = False
|
||||
for key in ('tableofcontents', ):
|
||||
if key not in self.meta and key in f.info:
|
||||
self.meta[key] = f.info[key]
|
||||
edititem = True
|
||||
if u not in self.users:
|
||||
self.add_user(u)
|
||||
t = Transfer.get_or_create(self.id)
|
||||
|
@ -406,8 +404,7 @@ class Item(db.Model):
|
|||
t.save()
|
||||
self.added = datetime.utcnow()
|
||||
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()
|
||||
f.move()
|
||||
self.update_icons()
|
||||
|
|
Loading…
Reference in a new issue