Skip to content

Commit

Permalink
fix: Fix an error when there's no variables in prompt management.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 720230874
  • Loading branch information
vertex-sdk-bot authored and copybara-github committed Jan 27, 2025
1 parent 713ffac commit 7af99f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vertexai/prompts/_prompt_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ def _populate_fields_from_metadata(
for execution in executions:
serialized_variable_set = execution.arguments
variable_set = {}
if serialized_variable_set:
if serialized_variable_set and serialized_variable_set.variables:
for name, value in serialized_variable_set.variables.items():
# Parts are dicts, not gapic objects for variables
variable_set[name] = [
Expand Down

0 comments on commit 7af99f0

Please sign in to comment.