Skip to content

Commit

Permalink
Return sourceId = url for syncService->getSourceId if endpoint = null
Browse files Browse the repository at this point in the history
  • Loading branch information
WilcoLouwerse committed Jan 30, 2024
1 parent 8da748a commit f64a960
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/src/Service/SynchronizationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -1523,6 +1523,10 @@ public function aquireObject(string $url, Entity $entity): ?ObjectEntity
*/
public function getSourceId(?string &$endpoint, ?string $url = null): ?string
{
if ($endpoint === null) {
return $url;
}

$explodedEndpoint = explode('/', $endpoint);
$sourceId = end($explodedEndpoint);
if (Uuid::isValid($sourceId) === true || is_int((int) $sourceId) === true) {
Expand Down

0 comments on commit f64a960

Please sign in to comment.