Updated do_badger to take an optional set of roles.
The 'role' parameter now must be passed as keyword arg instead of positional arg. Either 'role' or 'roles' must be given.
This commit is contained in:
@@ -118,7 +118,7 @@ def update_subscription():
|
||||
action = 'grant' if grant_subscriber else 'revoke'
|
||||
my_log.info('%sing subscriber role to user %s (Blender ID email %s)',
|
||||
action, user_id, email)
|
||||
service.do_badger(action, 'subscriber', user_id=user_id)
|
||||
service.do_badger(action, role='subscriber', user_id=user_id)
|
||||
else:
|
||||
my_log.debug('Not changing subscriber role, grant=%r and is=%s',
|
||||
grant_subscriber, is_subscriber)
|
||||
@@ -126,7 +126,7 @@ def update_subscription():
|
||||
if grant_demo != is_demo:
|
||||
action = 'grant' if grant_demo else 'revoke'
|
||||
my_log.info('%sing demo role to user %s (Blender ID email %s)', action, user_id, email)
|
||||
service.do_badger(action, 'demo', user_id=user_id)
|
||||
service.do_badger(action, role='demo', user_id=user_id)
|
||||
else:
|
||||
my_log.debug('Not changing demo role, grant=%r and is=%s',
|
||||
grant_demo, is_demo)
|
||||
|
Reference in New Issue
Block a user