diff --git a/oml/changelog.py b/oml/changelog.py index f79cd42..4101ca1 100644 --- a/oml/changelog.py +++ b/oml/changelog.py @@ -258,6 +258,7 @@ class Changelog(db.Model): peer = User.get_or_create(peerid) if not 'username' in peer.info: peer.info['username'] = username + peer.update_name() peer.save() return True diff --git a/oml/item/models.py b/oml/item/models.py index 36be8ee..3676a38 100644 --- a/oml/item/models.py +++ b/oml/item/models.py @@ -406,6 +406,7 @@ class Item(db.Model): self.delete() else: self.update() + Transfer.query.filter_by(item_id=self.id).delete() Changelog.record(user, 'removeitem', self.id) class Sort(db.Model):