mirror of https://github.com/zulip/zulip.git
backends.py: Don't pass mutable default arguments.
Values of mutable default arguments are shared across all function invocations. See https://pythonconquerstheuniverse.wordpress.com/2012/02/15/mutable-default-arguments/ for further details.
This commit is contained in:
parent
7bcf24d39c
commit
f7860bca48
|
@ -266,8 +266,11 @@ class GoogleMobileOauth2Backend(ZulipAuthMixin):
|
|||
|
||||
"""
|
||||
|
||||
def authenticate(self, google_oauth2_token=None, realm_subdomain=None, return_data={}):
|
||||
# type: (Optional[str], Optional[Text], Dict[str, Any]) -> Optional[UserProfile]
|
||||
def authenticate(self, google_oauth2_token=None, realm_subdomain=None, return_data=None):
|
||||
# type: (Optional[str], Optional[Text], Optional[Dict[str, Any]]) -> Optional[UserProfile]
|
||||
if return_data is None:
|
||||
return_data = {}
|
||||
|
||||
try:
|
||||
token_payload = googleapiclient.verify_id_token(google_oauth2_token, settings.GOOGLE_CLIENT_ID)
|
||||
except AppIdentityError:
|
||||
|
|
Loading…
Reference in New Issue