fix: allow elicitations accepted without content (#1285)

Co-authored-by: Olivier Schiavo <olivier.schiavo@wengo.com>
This commit is contained in:
owengo 2025-09-17 16:34:15 +02:00 • committed by GitHub
commit b41b9175e8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -98,7 +98,7 @@ async def elicit_with_validation(
related_request_id=related_request_id,
)
if result.action == "accept" and result.content:
if result.action == "accept" and result.content is not None:
# Validate and parse the content using the schema
validated_data = schema.model_validate(result.content)
return AcceptedElicitation(data=validated_data)