Fix class lookup
This commit is contained in:
parent
c7cf296d98
commit
c12f5cf570
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue