Skip to content

Bug: If there are 2 ShiftTemplate with the same name, weekday and time, only one of them is show in the shift template calendar #753

@Theophile-Madet

Description

@Theophile-Madet

The bug happens in tapir.shifts.views.calendars.ShiftTemplateOverview.get_context_data, where several dictionaries are built and the name of the shift is used as a key.

That function is overall quite confusing and could use a refactor. For my defense that's code from when I was learning Python and Django :p.
I'm assuming part of why it's written this way have as few database requests as possible, since if there are over 100 templates on the calendar we must be careful how many requests we trigger.

THe bug was first mentioned on Slack here: https://supercoopberlin.slack.com/archives/C01SYB5QSTB/p1772800546215879

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions