also alwyas allow cancelPeering

This commit is contained in:
j 2016-01-16 18:51:32 +05:30
parent cfbc90b50b
commit ad45b32fdc
1 changed files with 2 additions and 1 deletions

View File

@ -77,7 +77,8 @@ def api_call(action, user_id, args):
with db.session():
u = user.models.User.get(user_id)
if action in (
'requestPeering', 'acceptPeering', 'rejectPeering', 'removePeering'
'requestPeering', 'acceptPeering', 'rejectPeering',
'removePeering', 'cancelPeering'
) or (u and u.peered):
content = getattr(nodeapi, 'api_' + action)(user_id, *args)
else: