fix(organization): keep the show_* flags a partial update does not send

Merged
CE
7d ago
+103-10

Problem

OrganizationUpdateHandler coerced every show_* flag whether or not the input sent it: !!undefined turned the off-by-default flags (show_profits, show_bonuses_paid, show_income, show_total_hours) off, and undefined !== false turned the on-by-default ones on. PUT /organization/:id and the updateOrganization mutation accept partial input, so a name-only update reset the public-profile settings.

Fix

Write a flag only when the input carries it, with the same coercion as before.

Tests

New organization.update.handler.spec.ts: a name-only update writes none of the nine flags; sent flags are still written and coerced.

Notes

Not built or run locally.


Summary by cubic

Fixes partial organization updates resetting the public-profile show_* flags. OrganizationUpdateHandler coerced every flag even when the input didn't carry it, so a name-only PUT /organization/:id or updateOrganization mutation turned the unsent flags back to their defaults. Flags are now written only when present in the input, keeping the same coercion as before.

Adds a spec covering name-only updates preserving all nine flags and sent flags still being written and coerced.