Skip to content
This repository has been archived by the owner on Dec 14, 2022. It is now read-only.

Set default value for encoding in validator #20

Merged
merged 3 commits into from
Jun 10, 2022

Conversation

sanders41
Copy link

Fixes #19

Default values in pydantic don't seem to be available to the root_validator so ENCODING was throwing and error when it was not present in the toml file. This fixes the issue by setting the default value in the validator when the value is missing.

Copy link
Contributor

@pattisdr pattisdr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@pattisdr pattisdr merged commit 8037b85 into main Jun 10, 2022
@pattisdr pattisdr deleted the assemble-root-access-token branch June 10, 2022 20:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

KeyError on validation when toml files doesn't contain ENCODING
2 participants