Skip to content

Commit 4a7af4b

Browse files
stricter if check
1 parent ac472bc commit 4a7af4b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sentry_sdk/integrations/pydantic_ai/spans/ai_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
def _set_system_instruction(span: "sentry_sdk.tracing.Span", messages: "Any") -> None:
5252
for msg in messages:
5353
for part in msg.parts:
54-
if isinstance(part, SystemPromptPart):
54+
if SystemPromptPart and isinstance(part, SystemPromptPart):
5555
system_prompt = part.content
5656
set_data_normalized(
5757
span,

0 commit comments

Comments
 (0)