Merge pull request #32677 from alexandre-janniaux/apithirdparties-num_rows-leftovers

FIX: api_thirdparties: fix num_rows typo
This commit is contained in:
Laurent Destailleur 2025-01-16 14:35:42 +01:00 committed by GitHub
commit e4a7b286b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1865,7 +1865,7 @@ class Thirdparties extends DolibarrApi
$result = $this->db->query($sql);
// We do not found an existing SocieteAccount entity for this fk_soc and site ; we then create a new one.
if ($result && $this->db->num_rows == 0) {
if ($result && $this->db->num_rows($result) == 0) {
if (!isset($request_data['key_account'])) {
throw new RestException(422, 'Unprocessable Entity: You must pass the key_account attribute in your request data !');
}