Skip to content

Commit ab93a5c

Browse files
cboldisclaude
andcommitted
fix(serenity): restore parent_id: null in updateProjectTag body
The previous fix used `?? undefined` to satisfy TypeScript, but `null ?? undefined` evaluates to `undefined`, which JSON-serializes as a missing key — breaking the null-promotion contract. Cast to `any` instead so the null is preserved on the wire while TypeScript is satisfied. Introduced by: N/A Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent b6d1aca commit ab93a5c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/support/serenity/rest-transport.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,9 @@ export function createSerenityTransport({ env, imsToken }) {
581581
+ 'Pass the tag\'s current parent id to rename in place, or null to promote deliberately.',
582582
);
583583
}
584-
const body = { name, parent_id: parentId ?? undefined };
584+
// parent_id: null is intentional (promotes tag to root); cast needed because the
585+
// generated type omits null even though the API accepts it for field-clearing PATCH.
586+
const body = /** @type {any} */({ name, parent_id: parentId });
585587
return unwrap('PATCH', await projects.PATCH(
586588
'/v2/workspaces/{id}/projects/{project_id}/aio/tags/{tag_id}',
587589
{

0 commit comments

Comments
 (0)