fix removing file
This commit is contained in:
parent
efc6cfaddc
commit
f28e3816ff
2 changed files with 2 additions and 0 deletions
|
@ -258,6 +258,7 @@ class Changelog(db.Model):
|
||||||
peer = User.get_or_create(peerid)
|
peer = User.get_or_create(peerid)
|
||||||
if not 'username' in peer.info:
|
if not 'username' in peer.info:
|
||||||
peer.info['username'] = username
|
peer.info['username'] = username
|
||||||
|
peer.update_name()
|
||||||
peer.save()
|
peer.save()
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
|
@ -406,6 +406,7 @@ class Item(db.Model):
|
||||||
self.delete()
|
self.delete()
|
||||||
else:
|
else:
|
||||||
self.update()
|
self.update()
|
||||||
|
Transfer.query.filter_by(item_id=self.id).delete()
|
||||||
Changelog.record(user, 'removeitem', self.id)
|
Changelog.record(user, 'removeitem', self.id)
|
||||||
|
|
||||||
class Sort(db.Model):
|
class Sort(db.Model):
|
||||||
|
|
Loading…
Reference in a new issue