Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
whats-open
Commits
8416d22c
Verified
Commit
8416d22c
authored
Nov 03, 2017
by
David Haynes
🙆
Browse files
Add additional condition to check that the promoted schedule is in effect
- only promote if it is active
parent
e4c212d4
Pipeline
#1733
passed with stage
in 1 minute and 40 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
whats-open/api/models.py
View file @
8416d22c
...
...
@@ -179,6 +179,7 @@ class Facility(TimeStampedModel):
if
special_schedule
.
valid_end
<
datetime
.
date
.
today
()
and
special_schedule
.
schedule_for_removal
:
self
.
special_schedules
.
remove
(
special_schedule
)
elif
special_schedule
.
promote_to_main
:
if
special_schedule
.
valid_start
<
datetime
.
date
.
today
()
and
special_schedule
.
valid_end
>=
datetime
.
date
.
today
():
self
.
main_schedule
=
special_schedule
class
Meta
:
...
...
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