From e7eea5b9d2ce4705e52c117695acec4096e5447b Mon Sep 17 00:00:00 2001 From: Ross Scroggs Date: Fri, 13 Mar 2020 05:24:22 -0700 Subject: [PATCH] Fix code to account for Google API change that prevented clearing a user's recovery phone. (#1116) Before you had to pass None and the value, now you pass an empty string just like recovery email --- src/gam.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/gam.py b/src/gam.py index 96f2278b..eace758e 100755 --- a/src/gam.py +++ b/src/gam.py @@ -6140,11 +6140,8 @@ def getUserAttributes(i, cd, updateCmd): i += 2 elif myarg in ['recoveryphone']: body['recoveryPhone'] = sys.argv[i+1] - if body['recoveryPhone']: - if body['recoveryPhone'][0] != '+': - body['recoveryPhone'] = '+' + body['recoveryPhone'] - else: - body['recoveryPhone'] = None + if body['recoveryPhone'] and body['recoveryPhone'][0] != '+': + body['recoveryPhone'] = '+' + body['recoveryPhone'] i += 2 elif myarg == 'clearschema': if not updateCmd: