Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
wattsworth
/
lumen-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
781975d4
authored
Jun 05, 2017
by
John Doe
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fixed bug on sorting code
parent
95eb4833
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
app/services/data/load_element_data.rb
app/services/data/load_element_data.rb
View file @
781975d4
...
@@ -42,12 +42,12 @@ class LoadElementData
...
@@ -42,12 +42,12 @@ class LoadElementData
@end_time
=
end_time
@end_time
=
end_time
if
start_time
==
nil
if
start_time
==
nil
@start_time
=
streams_with_data
@start_time
=
streams_with_data
.
sort
{
|
a
,
b
|
a
.
start_time
<
b
.
start_time
}
.
sort
_by
{
|
x
|
x
.
start_time
}
.
first
.
start_time
.
first
.
start_time
end
end
if
end_time
==
nil
if
end_time
==
nil
@end_time
=
streams_with_data
@end_time
=
streams_with_data
.
sort
{
|
a
,
b
|
a
.
end_time
>
b
.
end_time
}
.
sort
_by
{
|
x
|
-
1
*
x
.
end_time
}
.
first
.
end_time
.
first
.
end_time
end
end
if
@start_time
>
@end_time
if
@start_time
>
@end_time
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment