Better header check for OAuth2 helper (#27897)

This commit is contained in:
Paulus Schoutsen 2019-10-18 18:11:54 -07:00 committed by Andrew Sayre
parent 914ceea72d
commit 6391a68fd5

View file

@ -392,7 +392,7 @@ async def async_oauth2_request(
url, url,
**kwargs, **kwargs,
headers={ headers={
**kwargs.get("headers", {}), **(kwargs.get("headers") or {}),
"authorization": f"Bearer {token['access_token']}", "authorization": f"Bearer {token['access_token']}",
}, },
) )