Revert "[validation] Allow `maybe_simple_value` to not have default key in complex value" (#7305)

This commit is contained in:
Jesse Hills 2024-08-18 20:27:03 +12:00
parent 28bb0ddfeb
commit 7464b440c0
No known key found for this signature in database
GPG Key ID: BEAAE804EFD8E83A

View File

@ -1864,7 +1864,7 @@ def maybe_simple_value(*validators, **kwargs):
if value == SCHEMA_EXTRACT:
return (validator, key)
if isinstance(value, dict):
if isinstance(value, dict) and key in value:
return validator(value)
return validator({key: value})