Skip to content

Commit

Permalink
Tested fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenvdlinde committed Nov 1, 2024
1 parent 6b6a889 commit 4defa6e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/Service/DirectoryService.php
Original file line number Diff line number Diff line change
Expand Up @@ -397,11 +397,15 @@ public function syncExternalDirectory(string $url): array
'directory'=>$listing['directory']
]
);


// Fallback to create if the listing does not exist
$oldListing = null;
if (count($oldListings) > 0) {
$oldListing = $oldListings[0];
} else {
$listing['hash'] = hash('sha256', json_encode($listing));
$listing['uuid'] = $listing['id'];
$listing['catalog'] = $listing['id'];
unset($listing['id']);
}

Expand Down

0 comments on commit 4defa6e

Please sign in to comment.