Fix class lookup

This commit is contained in:
Maxime Renou 2020-05-13 13:24:18 +02:00
parent c7cf296d98
commit c12f5cf570
1 changed files with 1 additions and 2 deletions

View File

@ -456,10 +456,9 @@ class Connect
foreach (self::$foreignKeys as $key => $resourceType)
{
if (!array_key_exists($key, $data)) continue;
if (!array_key_exists($resourceType, $this->synchronized)) continue;
$model = $this->resolveResourceModel($resourceType);
if (!in_array(HasConnectSync::class, class_uses($model))) continue;
$record = $model::findConnectResource($data[$key]);
$data[$key] = $record ? $record->id : null;
}