We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug Having two validators with defaults break string casting of lists in .env file
.env
To Reproduce Steps to reproduce the behavior:
.env .gitignore config.py
DYNACONF_GROUP__TEST_LIST = ["'1'", "'2S'"] DYNACONF_GROUP__ANOTHER = 45
config.py
from dynaconf import Dynaconf, Validator settings = Dynaconf( load_dotenv=True, environments=True, ) settings.validators.register( Validator("group.something_new", default=2), Validator("group.another_new", default=3), ) settings.validators.validate()
dynaconf -i config.settings list
Expected behavior Expected output of the above command:
Working in development environment LOAD_DOTENV<bool> True GROUP<dict> {'ANOTHER': 45, 'TEST_LIST': ['1', '2S'], 'another_new': 3, 'something_new': 2}
Notice the first item of TEST_LIST.
TEST_LIST
Actual behavior Actual output of the above command:
Working in development environment LOAD_DOTENV<bool> True GROUP<dict> {'ANOTHER': 45, 'TEST_LIST': [1, '2S'], 'another_new': 3, 'something_new': 2}
Environment (please complete the following information):
Additional context If you comment out one of the two validators, the problem disappears.
Might be related to #988, as mentioned on gitter by @rochacbruno.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
Having two validators with defaults break string casting of lists in
.env
fileTo Reproduce
Steps to reproduce the behavior:
Project structure
Config files
.env
Code
config.py
Execution
Expected behavior
Expected output of the above command:
Notice the first item of
TEST_LIST
.Actual behavior
Actual output of the above command:
Notice the first item of
TEST_LIST
.Environment (please complete the following information):
Additional context
If you comment out one of the two validators, the problem disappears.
Might be related to #988, as mentioned on gitter by @rochacbruno.
The text was updated successfully, but these errors were encountered: