ref #90088 fix code

This commit is contained in:
Ivan Chaplygin 2023-06-07 13:39:01 +03:00
parent 7d3390bc02
commit 792546d007

View File

@ -165,11 +165,13 @@ class ModelExtensionRetailcrmReferences extends Model
{
$response = $this->retailcrmApiClient->sitesList();
if (!$response) {
if (!$response || !$response->isSuccessful()) {
return [];
}
return (!$response->isSuccessful()) ? [] : end($response->sites);
$sites = $response->sites;
return end($sites);
}
/**