Skip to content

Commit

Permalink
[frontend/accessible_time] Fixing soft_end set to end when soft_end n…
Browse files Browse the repository at this point in the history
…ot given
  • Loading branch information
AlexandreDoneux committed May 17, 2024
1 parent fed730d commit 05daaf2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion inginious/frontend/accessible_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ def __init__(self, period):
self._start = period["start"]
self._end = period["end"]
if "soft_end" in period:
self._soft_end = min(period["soft_end"], period["end"])
if period["soft_end"] == self.max:
self._soft_end = self.max
else:
soft_end = min(period["soft_end"], period["end"])
self._soft_end = soft_end

def legacy_string_structure_to_dict(self, legacy_date):
"""
Expand Down

0 comments on commit 05daaf2

Please sign in to comment.