Describe the bug
Setting the environment variable ENABLE_DATETIME_INDEX_FILTERING to " false" is evaluated as truthy in the bulk insert item endpoint.
The bug is caused by https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/blob/main/stac_fastapi/core/stac_fastapi/core/core.py#L1432 that uses os.getenv() instead of the get_bool_env() function.
To Reproduce
Enable the BulkTransactionExtension and set ENABLE_DATETIME_INDEX_FILTERING="false"
Expected behavior
"false" should be considered as false.
Describe the bug
Setting the environment variable
ENABLE_DATETIME_INDEX_FILTERINGto" false"is evaluated as truthy in the bulk insert item endpoint.The bug is caused by https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/blob/main/stac_fastapi/core/stac_fastapi/core/core.py#L1432 that uses
os.getenv()instead of theget_bool_env()function.To Reproduce
Enable the BulkTransactionExtension and set
ENABLE_DATETIME_INDEX_FILTERING="false"Expected behavior
"false"should be considered asfalse.