Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
bat_api
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
bat_api
Commits
e4ef7532
Commit
e4ef7532
authored
Jan 15, 2016
by
istos
Browse files
Options
Downloads
Patches
Plain Diff
When working with the Event store set Unit default value to 0
parent
b89312d4
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
bat_api.module
+4
-2
4 additions, 2 deletions
bat_api.module
with
4 additions
and
2 deletions
bat_api.module
+
4
−
2
View file @
e4ef7532
...
...
@@ -539,7 +539,9 @@ function bat_api_services_events_index($unit_ids, $unit_types, $start_date, $end
foreach
(
$ids
as
$id
)
{
if
(
$bat_unit
=
bat_unit_load
(
$id
))
{
if
(
in_array
(
$bat_unit
->
type
,
$unit_types
)
||
empty
(
$unit_types
))
{
$units
[]
=
new
Unit
(
$id
,
$bat_unit
->
getEventDefaultValue
(
$type
));
// Setting the default value to 0 since we are dealing with the events array
// so getting event IDs.
$units
[]
=
new
Unit
(
$id
,
0
);
}
}
}
...
...
@@ -711,7 +713,7 @@ function bat_api_services_edit_event($event_id, $bat_event_data) {
return
$return
;
}
/**
* Merge non blocking events.
* Merge non blocking events
so that we display them as a continuous single event
.
*
* @param $events array
*
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment