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', {});
|
trigger_event('change', {});
|
||||||
for change in changes:
|
for change in changes:
|
||||||
if user.id in state.removepeer:
|
if user.id in state.removepeer:
|
||||||
user.cleanup()
|
|
||||||
del state.removepeer[user.id]
|
del state.removepeer[user.id]
|
||||||
return False
|
return False
|
||||||
if not cls.apply_change(user, change, trigger=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']:
|
if self.name in settings.ui['showFolder']:
|
||||||
del settings.ui['showFolder'][self.name]
|
del settings.ui['showFolder'][self.name]
|
||||||
settings.ui._save()
|
settings.ui._save()
|
||||||
|
state.removepeer[self.id] = True
|
||||||
self.cleanup()
|
self.cleanup()
|
||||||
if was_peering:
|
if was_peering:
|
||||||
Changelog.record(state.user(), 'removepeer', self.id)
|
Changelog.record(state.user(), 'removepeer', self.id)
|
||||||
state.removepeer[self.id] = True
|
|
||||||
self.save()
|
self.save()
|
||||||
|
|
||||||
def cleanup(self):
|
def cleanup(self):
|
||||||
|
|
Loading…
Reference in a new issue