Clean up handling of missing DOI_API_PREFIX
setting
#1721
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This setting should never be unset in a real deployment of DANDI, so silently replacing it with a default if it's missing is not ideal.
Instead, this PR changes it so that things fail loudly and raise and error if this setting is not supplied in an env var. In dev/testing configurations it is still hardcoded to the placeholder value, but this is done at the Django setting layer instead of directly in the application code.