Verified Commit ee4d7c4b authored by Damien's avatar Damien

FEAT #11902 TIME 0:05 Fix pre process again

parent 76b3a7c8
......@@ -1491,14 +1491,7 @@ class PreProcessActionController
$resourcesInformation['error'][] = ['alt_identifier' => $resource['alt_identifier'], 'res_id' => $resId, 'reason' => 'noFilename'];
continue;
}
$targetResource = ResModel::getById(['select' => ['category_id', 'filename'], 'resId' => $body['data']['resId']]);
if (empty($targetResource)) {
return ['errors' => ['Target resource does not exist']];
} elseif ($targetResource['category_id'] == 'outgoing' && empty($targetResource['filename'])) {
return ['errors' => ['Target resource has no file']];
}
$resourcesInformation['success'][] = ['alt_identifier' => $resource['alt_identifier'], 'res_id' => $resId];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment