Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RadioObservatory
LOFAR
Commits
ff734145
Commit
ff734145
authored
3 years ago
by
Jorrit Schaap
Browse files
Options
Downloads
Plain Diff
Merge branch '
TMSS-1548
' into 'master'
TMSS-1548
: minor fix Closes
TMSS-1548
See merge request
!738
parents
b42cc327
d7224c0a
No related branches found
No related tags found
1 merge request
!738
TMSS-1548: minor fix
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
SAS/TMSS/backend/src/tmss/tmssapp/adapters/reports.py
+1
-1
1 addition, 1 deletion
SAS/TMSS/backend/src/tmss/tmssapp/adapters/reports.py
with
1 addition
and
1 deletion
SAS/TMSS/backend/src/tmss/tmssapp/adapters/reports.py
+
1
−
1
View file @
ff734145
...
@@ -314,7 +314,7 @@ def _get_usage_mode(cycle: models.Cycle, start: datetime, stop: datetime) -> {}:
...
@@ -314,7 +314,7 @@ def _get_usage_mode(cycle: models.Cycle, start: datetime, stop: datetime) -> {}:
reservations_dutch_only
=
reservations
.
filter
(
specifications_doc__resources__stations__contained_by
=
dutch_stations
)
reservations_dutch_only
=
reservations
.
filter
(
specifications_doc__resources__stations__contained_by
=
dutch_stations
)
duration_dutch_only
=
reservations_dutch_only
.
aggregate
(
duration
=
Sum
(
F
(
'
stop_time
'
)
-
F
(
'
start_time
'
)))[
'
duration
'
]
duration_dutch_only
=
reservations_dutch_only
.
aggregate
(
duration
=
Sum
(
F
(
'
stop_time
'
)
-
F
(
'
start_time
'
)))[
'
duration
'
]
duration
=
duration_dutch_only
.
total_seconds
()
-
duration_sa_dutch_only
.
total_seconds
()
if
duration_dutch_only
and
duration_sa_dutch_only
else
None
duration
=
duration_dutch_only
.
total_seconds
()
-
duration_sa_dutch_only
.
total_seconds
()
if
duration_dutch_only
and
duration_sa_dutch_only
else
None
result
[
'
ILT mode
'
][
'
ILT Dutch
'
]
=
duration
if
duration
>
0
else
None
result
[
'
ILT mode
'
][
'
ILT Dutch
'
]
=
duration
if
duration
is
not
None
and
duration
>
0
else
None
return
result
return
result
...
...
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