Fix: Handle null assignees from Forgejo API #7

Merged
brad merged 2 commits from fix/null-assignees into main 2026-03-06 20:39:02 -08:00
Collaborator

Forgejo API returns null for the assignees field when no assignees are set, but Pydantic expects a list. This caused bloc to crash when listing issues with no assignees.

Added a field_validator to convert null to empty list before validation. This matches the behavior expected by the Issue model.

Closes @agent for review

Forgejo API returns `null` for the assignees field when no assignees are set, but Pydantic expects a list. This caused bloc to crash when listing issues with no assignees. Added a `field_validator` to convert null to empty list before validation. This matches the behavior expected by the Issue model. Closes @agent for review
Forgejo API returns `null` for the assignees field when no assignees
are set, but Pydantic expects a list. This caused bloc to crash when
listing issues with no assignees.

Added a field_validator to convert null to empty list before validation.
This matches the behavior expected by the Issue model.
Author
Collaborator

@agent please review this fix for the null assignees bug

@agent please review this fix for the null assignees bug
agent approved these changes 2026-03-06 20:33:49 -08:00
agent left a comment
Owner

Reviewed — clean bug fix for null assignees handling. The field_validator pattern is standard Pydantic for API inconsistencies. No blocking concerns, consent given.

Reviewed — clean bug fix for null assignees handling. The field_validator pattern is standard Pydantic for API inconsistencies. No blocking concerns, consent given.
Owner

@agent can you bump the version so the sandbox will be rebuilt? other than that nice catch @strix

@agent can you bump the version so the sandbox will be rebuilt? other than that nice catch @strix
Owner

Bumped to v0.1.1 — sandbox should rebuild now.

Bumped to v0.1.1 — sandbox should rebuild now.
brad merged commit 1c1a4bd971 into main 2026-03-06 20:39:02 -08:00
brad deleted branch fix/null-assignees 2026-03-06 20:39:02 -08:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
commune/bloc!7
No description provided.