Skip to content

Requirements PATCH cannot clear nullable fields (None-skip idiom) #30

Description

@CST-100

Found during the devel integration review (PR #15/#25).

PATCH /api/requirements/{id} skips None values, so rationale/category/verification_method — and notably tbr_owner_id/tbr_due, which gate baselining — can never be cleared once set. The detail page sends explicit null when a field is emptied and silently no-ops (UI shows cleared until reload). A wrong TBR owner is only fixable by toggling tbr off and on.

Same root idiom was fixed for procedure-step caution/required_role during integration (use model_fields_set to distinguish absent from explicit null) — apply the same pattern here, field-by-field where clearing is legitimate.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions