Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions l10n_fr_chorus_account/models/res_company.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ def _get_token(self, api_params):
logger.debug("_get_token expiry_date_gmt=%s now=%s", expiry_date_gmt, now)
if now > expiry_date_gmt:
# force clear cache
self._get_new_token.clear_cache(self.env[self._name])
# self._get_new_token.clear_cache(self.env[self._name])
logger.info("PISTE Token cleared from cache.")
token, expiry_date_gmt = self._get_new_token(
api_params["oauth_id"], api_params["oauth_secret"], api_params["qualif"]
Expand All @@ -263,7 +263,7 @@ def _chorus_post(self, api_params, url_path, payload, session=None):
"cpro-account": auth_piste_b64,
}
# The header Authorization: Bearer <token> is automatically added by the session
if session is None:
if not session:
token = self._get_token(api_params)
session = OAuth2Session(api_params["oauth_id"], token=token)
logger.info(
Expand Down