-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
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
Error when parsing empty list with subcast #137
Labels
Comments
Thanks for reporting. PRs welcome! =) |
@sloria I have a fix :
What do you think ? |
Seems like a reasonable fix |
sabdouni
added a commit
to sabdouni/environs
that referenced
this issue
Mar 5, 2020
sloria
pushed a commit
that referenced
this issue
Mar 22, 2020
Fix is released in 7.3.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
The
env.list
can't handle an empty list when usingsubcast
It raises an exception
environs.EnvValidationError: Environment variable "LIST" invalid: {0: ['Not a valid integer.']}
This can be reproduced by e.g
If you don't use
subcast
it works just fine by e.gMaybe one solution is if the env variable is falsy (empty or doesn't exist)
env.list
should return the default value if definedHappy to submit a PR if that would be of interest. Thanks!
The text was updated successfully, but these errors were encountered: