Skip to content

Conversation

@malwilley
Copy link
Member

Closes ISWF-905

@malwilley malwilley requested a review from a team as a code owner January 24, 2026 00:42
@linear
Copy link

linear bot commented Jan 24, 2026

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jan 24, 2026
Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

)

if event_id_param:
open_periods = open_periods.filter(event_id=event_id_param)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filtering sliced queryset causes TypeError at runtime

High Severity

When both per_page and eventId query parameters are provided, calling .filter(event_id=event_id_param) on the open_periods queryset will fail with a TypeError. The get_open_periods_for_group function returns group_open_periods[:limit], which slices the queryset when limit is not None. In Django, filtering a sliced queryset raises TypeError: Cannot filter a query once a slice has been taken. The test case only tests eventId without per_page, so this crash path is not covered.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants