Fixed error overlapping when validation error is caused by remove_unset root validator in base types and methods. (#1290)

* Ensure base type validation can handle non-dictionary values

The update introduces a condition to verify whether the values being validated are a dictionary before attempting to handle UNSET_TYPE in the aiogram base type. This adjustment helps to prevent potential errors or incorrect validation when non-dictionary values are faced.

* Added a test case for non-dictionary input in remove_unset method

* Added changelog

* Fixed tests
This commit is contained in:
Alex Root Junior 2023-08-29 02:01:54 +03:00 committed by GitHub
parent e1be9dd668
commit 04bd0c9e7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 3 deletions

1
CHANGES/1290.bugfix.rst Normal file
View file

@ -0,0 +1 @@
Fixed error overlapping when validation error is caused by remove_unset root validator in base types and methods.