fix: ensure unique services mapping when creating api payload
This commit is contained in:
@@ -461,10 +461,12 @@ class BookingEditDraftService
|
||||
private function resolveServiceArray(array $serviceIds, array $services): array
|
||||
{
|
||||
$resolved = [];
|
||||
$addedIds = [];
|
||||
|
||||
foreach ($serviceIds as $serviceId) {
|
||||
if (isset($services[$serviceId])) {
|
||||
if (isset($services[$serviceId]) && false === isset($addedIds[$serviceId])) {
|
||||
$resolved[] = $services[$serviceId];
|
||||
$addedIds[$serviceId] = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user