Skip to content
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

DB initializing only checks whether environment variable is set, but not whether it is 1 or 0 #170

Closed
Zethson opened this issue Nov 20, 2020 · 1 comment · Fixed by #200
Assignees
Labels

Comments

@Zethson
Copy link
Collaborator

Zethson commented Nov 20, 2020

Describe the bug

When messing around with the setup I set the FLASK_DEBUG env to 0.
However, MegaQC expects it to be unset.

Expected behavior

I expect MegaQC to treat those special ENVs as unset if equal to 0.

@Zethson Zethson added the bug label Nov 20, 2020
@Zethson Zethson self-assigned this Nov 20, 2020
@multimeric
Copy link
Collaborator

It's true that this is a little unintuitive. It's not a particularly simple fix because even FLASK_DEBUG=0 is actually setting the variable to the string "0" which is a truthy value in Python. A more stable solution might be to use something like this library: https://pypi.org/project/env-flag/.

Zethson added a commit that referenced this issue Nov 27, 2020
Signed-off-by: Zethson <lukas.heumos@posteo.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants