mirror of
https://github.com/OCA/bank-statement-import.git
synced 2025-01-20 12:37:43 +02:00
[FIX] *_online_ponto: Correct retrieval of sync_id
This commit is contained in:
@@ -110,10 +110,12 @@ class PontoInterface(models.AbstractModel):
|
||||
)
|
||||
return
|
||||
data = self._get_response_data(response)
|
||||
sync_id = data.get("attributes", {}).get("resourceId", False)
|
||||
# The resourceId in data["attributes"] is the account,
|
||||
# we need the synchronization.
|
||||
sync_id = data.get("data", {}).get("id", False)
|
||||
if not sync_id:
|
||||
raise UserError(
|
||||
_("Ponto : no resourceId in synchronization data %s") % data
|
||||
_("Ponto : no synchronization id in data %s") % data
|
||||
)
|
||||
# Poll synchronization during 400 seconds for completion.
|
||||
url = PONTO_ENDPOINT + "/synchronizations/" + sync_id
|
||||
|
||||
Reference in New Issue
Block a user