Skip to content

Commit

Permalink
This should fix the error Joey was having occasionally when submittin…
Browse files Browse the repository at this point in the history
…g cadences, where the cadence allows requests which then fail validation, which breaks the compose page cadence editor
  • Loading branch information
Jon committed Aug 21, 2019
1 parent 9be4c45 commit b008c46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion observation_portal/requestgroups/cadence.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def expand_cadence_request(request_dict, is_staff=False):
request_dict['windows'] = [{'start': window_start, 'end': window_end}]
intervals_by_site = get_filtered_rise_set_intervals_by_site(request_dict, is_staff=is_staff)
largest_interval = get_largest_interval(intervals_by_site)
if largest_interval.total_seconds() >= request_duration and window_end > timezone.now():
if largest_interval.total_seconds() > request_duration and window_end > timezone.now():
# this cadence window passes rise_set and is in the future so add it to the list
request_copy = request_dict.copy()
del request_copy['cadence']
Expand Down

0 comments on commit b008c46

Please sign in to comment.