Skip to content

Commit 787ab7c

Browse files
committed
Use safe get for async validate_dependents
1 parent ff395e8 commit 787ab7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

guardrails/validator_service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ async def validate_dependents(
247247
self, value, metadata, validator_setup, validation_logs
248248
):
249249
async def process_child(child_setup):
250-
child_value = value[child_setup.key]
250+
child_value = safe_get(value, child_setup.key)
251251
child_validation_logs = FieldValidationLogs()
252252
validation_logs.children[child_setup.key] = child_validation_logs
253253
new_child_value, new_metadata = await self.async_validate(

0 commit comments

Comments
 (0)