fix removing peer while pulling changes
This commit is contained in:
parent
6f4672d296
commit
0ff3b9ee3c
2 changed files with 1 additions and 2 deletions
|
@ -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):
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue