Skip to content

Commit a330672

Browse files
fix if condition
1 parent 9abe620 commit a330672

File tree

1 file changed

+2
-3
lines changed
  • sentry_sdk/integrations/google_genai

1 file changed

+2
-3
lines changed

sentry_sdk/integrations/google_genai/utils.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -741,9 +741,8 @@ def _transform_system_instruction_one_level(
741741
text_parts.append({"type": "text", "content": part.text})
742742
return text_parts
743743

744-
if isinstance(system_instructions, dict):
745-
if system_instructions.get("text"):
746-
return [{"type": "text", "content": system_instructions["text"]}]
744+
if isinstance(system_instructions, dict) and system_instructions.get("text"):
745+
return [{"type": "text", "content": system_instructions["text"]}]
747746

748747
elif can_be_content and isinstance(system_instructions, dict):
749748
parts = system_instructions.get("parts", [])

0 commit comments

Comments
 (0)