diff --git a/oml/changelog.py b/oml/changelog.py index c7fcdde..7f665fb 100644 --- a/oml/changelog.py +++ b/oml/changelog.py @@ -83,7 +83,6 @@ class Changelog(db.Model): trigger_event('change', {}); for change in changes: if user.id in state.removepeer: - user.cleanup() del state.removepeer[user.id] return False if not cls.apply_change(user, change, trigger=False): diff --git a/oml/user/models.py b/oml/user/models.py index 3e57b1f..b5f0971 100644 --- a/oml/user/models.py +++ b/oml/user/models.py @@ -140,10 +140,10 @@ class User(db.Model): if self.name in settings.ui['showFolder']: del settings.ui['showFolder'][self.name] settings.ui._save() + state.removepeer[self.id] = True self.cleanup() if was_peering: Changelog.record(state.user(), 'removepeer', self.id) - state.removepeer[self.id] = True self.save() def cleanup(self):