Browse Source

Fix class lookup

tags/1.0
Maxime Renou 2 years ago
parent
commit
c12f5cf570
  1. 3
      src/Connect.php

3
src/Connect.php

@ -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…
Cancel
Save