From e186da247bb7fdfa1e8ddb9d08a4a3b32b1b6b73 Mon Sep 17 00:00:00 2001 From: Fedor Kuznetsov Date: Wed, 15 Nov 2023 14:14:20 +0800 Subject: [PATCH] fix: Processing a missing key in the default_values dictionary --- .../domain/usecases/BuildRoutesUsecase.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastapi_gateway_auto_generate/domain/usecases/BuildRoutesUsecase.py b/fastapi_gateway_auto_generate/domain/usecases/BuildRoutesUsecase.py index 3fe04e5..9e5a514 100644 --- a/fastapi_gateway_auto_generate/domain/usecases/BuildRoutesUsecase.py +++ b/fastapi_gateway_auto_generate/domain/usecases/BuildRoutesUsecase.py @@ -132,7 +132,7 @@ def sort_elements_by_value(arguments): argument["type"] = param_type if not route_model.query_required[i]: - argument["value"] = default_values[query] + argument["value"] = default_values.get(query, None) argument["type"] = f"{param_type} | None" if route_model.query_is_cookie[i]: