fix: server-side belt drops firm members' legacy organisation writes

↗ view on GitHub · sloth-ninja · 2026-08-13 · 05571808

PATCH /user/profile accepted and unconditionally wrote the legacy
free-text `organisation` field. A sibling frontend PR hides the input
for firm members; this is the server-side belt.

When the caller has a non-null organisation membership, the
organisation key is now silently dropped from the update before it
reaches the DB - not rejected with a 4xx, since the field is cosmetic
(absence-not-disabled precedent, WS8 PR B). Other fields in the same
PATCH still apply. Fails OPEN on a membership-lookup error: this is a
non-destructive cosmetic write, so availability wins (WS8 PR B
precedent, not the deletion fail-SAFE direction). Orgless callers are
unaffected. The membership lookup only runs when the payload actually
touches `organisation`, avoiding an extra query on unrelated PATCHes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Repository Sloth-ninja/JessicaOSS
Author sloth-ninja <ezanahaddis@gmail.com>
Authored
Parents 04b78e20
Stats 2 files changed , +273
Part of Pilot-feedback fixes: firm UI, connector registry, and legacy writes

Capture this commit into my fork

Download a Markdown prompt that tells Claude how to port this exact commit into your working tree. Run it via claude -p < capture-commit-05571808.md from inside the repo you want the change in.

⬇ Download capture-commit-05571808.md