Fix create alias target where target is a group

This commit is contained in:
Ross Scroggs
2016-04-06 07:52:53 -07:00
parent fdfa830aa0
commit bfc734138d

View File

@ -5566,7 +5566,7 @@ def doCreateAlias():
callGAPI(service=cd.groups().aliases(), function=u'insert', groupKey=targetKey, body=body) callGAPI(service=cd.groups().aliases(), function=u'insert', groupKey=targetKey, body=body)
elif target_type == u'target': elif target_type == u'target':
try: try:
callGAPI(service=cd.users().aliases(), function=u'insert', throw_reasons=[u'invalid'], userKey=targetKey, body=body) callGAPI(service=cd.users().aliases(), function=u'insert', throw_reasons=[u'invalid', u'badRequest'], userKey=targetKey, body=body)
except googleapiclient.errors.HttpError: except googleapiclient.errors.HttpError:
callGAPI(service=cd.groups().aliases(), function=u'insert', groupKey=targetKey, body=body) callGAPI(service=cd.groups().aliases(), function=u'insert', groupKey=targetKey, body=body)