From 2737b7613287a56e056122e3e0c4175521eb264c Mon Sep 17 00:00:00 2001 From: svd0 Date: Wed, 29 Jun 2022 11:33:09 -0300 Subject: [PATCH] Fix for loop on get_value_or_default function --- fastapi/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastapi/utils.py b/fastapi/utils.py index f6476933d..40bff3279 100644 --- a/fastapi/utils.py +++ b/fastapi/utils.py @@ -168,7 +168,7 @@ def get_value_or_default( Otherwise, the first item (a `DefaultPlaceholder`) will be returned. """ items = (first_item,) + extra_items - for item in (first_item,) + items: + for item in items: if not isinstance(item, DefaultPlaceholder): return item return first_item