fix(issue-sink): stringify triggering_event_id before JSON encode
IssueCoreRestSink.emit() passed task_spec.triggering_event_id straight into the httpx json= payload. When the field is a UUID object (rather than a string), httpx's JSON encoder raised "TypeError: Object of type UUID is not JSON serializable", failing the emission. Guard with str(), preserving None for optional event ids. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
200ec0c97a
commit
f05c56e202
1 changed files with 5 additions and 1 deletions
|
|
@ -66,7 +66,11 @@ class IssueCoreRestSink(IssueSink):
|
||||||
"due_in_days": task_spec.due_in_days,
|
"due_in_days": task_spec.due_in_days,
|
||||||
"source_type": task_spec.source_type,
|
"source_type": task_spec.source_type,
|
||||||
"source_id": task_spec.source_id,
|
"source_id": task_spec.source_id,
|
||||||
"triggering_event_id": task_spec.triggering_event_id,
|
"triggering_event_id": (
|
||||||
|
str(task_spec.triggering_event_id)
|
||||||
|
if task_spec.triggering_event_id is not None
|
||||||
|
else None
|
||||||
|
),
|
||||||
"activity_definition_id": task_spec.activity_definition_id,
|
"activity_definition_id": task_spec.activity_definition_id,
|
||||||
}
|
}
|
||||||
resp = httpx.post(
|
resp = httpx.post(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue