Skip to content

Commit 40a823a

Browse files
committed
Fix path parameter validation after rebase
- Ensure error location is added for both ValidationError and V1ValidationError - This fixes test failures where path parameter validation wasn't properly catching errors
1 parent ef4b997 commit 40a823a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

flask_pydantic/core.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ def validate_path_params(
120120
include_context=include_error_context,
121121
include_input=include_error_input,
122122
)[0]
123+
err["loc"] = [name]
124+
errors.append(err)
123125
except V1ValidationError as e:
124126
err = e.errors()[0]
125127
err["loc"] = [name]

0 commit comments

Comments
 (0)