Algolia accepts both int and string as objectID, but will convert them
to a string anyway as mentionned here.
When retrieving algolia records, we were trying to browse odoo records
from this objectID, which led to this kind of error:
Odoo Server Error
Traceback (most recent call last):
[...]
Exception
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/odoo/src/odoo/http.py", line 641, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/odoo/src/odoo/http.py", line 317, in _handle_exception
raise exception.with_traceback(None) from new_cause
psycopg2.DataError: value "7960745000" is out of range for type integer
LINE 1: ...vader_variant" WHERE "shopinvader_variant".id IN ('796074500...
^
This PR ensures that this objectID is casted to an integer.
Algolia accepts both
int
andstring
asobjectID
, but will convert them to a string anyway as mentionned here. When retrieving algolia records, we were trying to browse odoo records from this objectID, which led to this kind of error:This PR ensures that this
objectID
is casted to an integer.