diff --git a/agents-api/agents_api/models/agent/create_or_update_agent.py b/agents-api/agents_api/models/agent/create_or_update_agent.py index 9e51a8f6e..08adcfefd 100644 --- a/agents-api/agents_api/models/agent/create_or_update_agent.py +++ b/agents-api/agents_api/models/agent/create_or_update_agent.py @@ -83,7 +83,11 @@ def create_or_update_agent( data.default_settings = data.default_settings or {} agent_data = data.model_dump() - default_settings = data.default_settings.model_dump(exclude_unset=True) + default_settings = ( + data.default_settings.model_dump(exclude_none=True) + if data.default_settings + else {} + ) settings_cols, settings_vals = cozo_process_mutate_data( {