Fix web oncall calendars not loading (#891)
* Fix oncall schedules bug * Update custom_on_call_shift.py
This commit is contained in:
parent
bd275848dc
commit
2052faa8d1
1 changed files with 2 additions and 0 deletions
|
|
@ -373,6 +373,8 @@ class CustomOnCallShift(models.Model):
|
|||
expected_start_day = min(CustomOnCallShift.ICAL_WEEKDAY_REVERSE_MAP[d] for d in self.by_day)
|
||||
delta = (expected_start_day - start.weekday()) % 7
|
||||
start = start + timezone.timedelta(days=delta)
|
||||
if self.until is not None:
|
||||
self.until = self.until + timezone.timedelta(days=delta)
|
||||
|
||||
if self.frequency == CustomOnCallShift.FREQUENCY_DAILY and self.by_day:
|
||||
result = self._daily_by_day_to_ical(time_zone, start, users_queue)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue