Commit efc6634a authored by nicola85's avatar nicola85

Make event id truly unique

parent cc49d5fb
......@@ -929,7 +929,7 @@ function bat_api_services_events_index($target_ids, $target_types, $target_entit
foreach ($event_ids as $unit_id => $unit_events) {
foreach ($unit_events as $key => $event) {
$events_json[] = array(
'id' => (string) $key . $unit_id,
'id' => 'U' . $unit_id . 'E' . $key,
'bat_id' => $event->getValue(),
'resourceId' => 'S' . $unit_id,
) + $event->toJson($event_formatter);
......@@ -1038,7 +1038,7 @@ function bat_api_services_events_index_calendar($unit_ids, $unit_types, $start_d
foreach ($event_ids as $unit_id => $unit_events) {
foreach ($unit_events as $key => $event) {
$events_json[] = array(
'id' => (string) $key . $unit_id,
'id' => 'U' . $unit_id . 'E' . $key,
'bat_id' => $event->getValue(),
'resourceId' => 'S' . $unit_id,
) + $event->toJson($event_formatter);
......
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