Normalize nullable Gitea user profile fields in context endpoint #73

Closed
opened 2026-08-06 05:02:23 +00:00 by timmy · 0 comments
Owner

The Gitea user schema permits nullable full_name and email values. context() currently passes explicit nulls into non-nullable Pydantic User string fields, raising a validation error instead of returning dashboard context. Reproduce with a current-user payload containing full_name: null and email: null. Normalize those fields to empty strings.

Acceptance: a behavioral endpoint test reproduces the failure; context returns HTTP 200 with empty-string profile fields.

The Gitea user schema permits nullable `full_name` and `email` values. `context()` currently passes explicit nulls into non-nullable Pydantic `User` string fields, raising a validation error instead of returning dashboard context. Reproduce with a current-user payload containing `full_name: null` and `email: null`. Normalize those fields to empty strings. Acceptance: a behavioral endpoint test reproduces the failure; context returns HTTP 200 with empty-string profile fields.
timmy self-assigned this 2026-08-06 05:02:23 +00:00
timmy closed this issue 2026-08-06 05:03:46 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 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: stackchain/stackchain-dashboard#73
No description provided.