Skip to content
Snippets Groups Projects
Commit 1d64c5b4 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Merge branch '115-holiday-in_week-works-wrong-because-of-variable-shadowing' into 'master'

Resolve "Holiday.in_week works wrong because of variable shadowing"

Closes #115

See merge request !137
parents d106cacb e077b869
No related branches found
No related tags found
1 merge request!137Resolve "Holiday.in_week works wrong because of variable shadowing"
Pipeline #6349 passed
Pipeline: AlekSIS

#6350

    ......@@ -700,13 +700,13 @@ class Holiday(ExtensibleModel):
    for weekday in range(TimePeriod.weekday_min, TimePeriod.weekday_max + 1):
    holiday_date = week[weekday]
    holidays = list(
    filtered_holidays = list(
    filter(
    lambda h: holiday_date >= h.date_start and holiday_date <= h.date_end, holidays,
    )
    )
    if holidays:
    per_weekday[weekday] = holidays[0]
    if filtered_holidays:
    per_weekday[weekday] = filtered_holidays[0]
    return per_weekday
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment