Skip to content

Release 1.150.0 - #3571

Merged
odlbot merged 14 commits into
releasefrom
release-candidate
May 11, 2026
Merged

odlbot merged 14 commits into
releasefrom
release-candidate

Conversation

@odlbot

@odlbot odlbot commented May 11, 2026

Copy link
Copy Markdown
Contributor

renovate[bot]

annagav

Nathan Levesque

Dan Subak

Muhammad Anas

dsubak and others added 14 commits May 7, 2026 10:04
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…3562)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

OpenAPI Changes

Show/hide ## Changes for v0.yaml:
## Changes for v0.yaml:
No changes detected

## Changes for v1.yaml:
No changes detected

## Changes for v2.yaml:
No changes detected

Unexpected changes? Ensure your branch is up-to-date with main (consider rebasing).

user = self.request.user
if qp.get("org_id"):
added_context["org_id"] = qp.get("org_id")
added_context["org_id"] = int(qp.get("org_id"))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Bug: Direct int() conversion of org_id and contract_id query parameters without error handling can raise a ValueError if a non-integer value is provided, causing a 500 error.
Severity: HIGH

Suggested Fix

Wrap the int() conversions for org_id and contract_id in a try-except ValueError block. Handle the case where the conversion fails, for example, by using a default value or ignoring the parameter.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: courses/views/v2/__init__.py#L454

Potential issue: In `CourseViewSet.get_serializer_context()`, the `org_id` and
`contract_id` query parameters are directly converted to integers using `int()`. If a
non-integer string is passed for either parameter, this will raise a `ValueError`. The
view's filter class silently fails on invalid input, but the unconverted string remains
in `request.query_params` and is passed to `get_serializer_context`. Since this
`ValueError` is not caught, it results in an unhandled exception and a 500 server error.
This endpoint is publicly accessible as `permission_classes = []`.

Did we get this right? 👍 / 👎 to inform future reviews.

@odlbot
odlbot merged commit 30ce4e2 into release May 11, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants