Closed chasewalden closed 4 years ago
os.getenv('RAW_BODY') returns None if not defined, causing a TypeError in python3-flask-debian (potentially in others)
os.getenv('RAW_BODY')
None
File "index.py", line 13, in is_true return len(val) > 0 and val.lower() == "true" or val == "1" TypeError: object of type 'NoneType' has no len()
https://github.com/openfaas-incubator/python-flask-template/blob/7f9288a527b4c2b8acabb2271c38c4d3745d4310/template/python3-flask-debian/index.py#L12-L13
os.getenv('RAW_BODY')
returnsNone
if not defined, causing a TypeError in python3-flask-debian (potentially in others)https://github.com/openfaas-incubator/python-flask-template/blob/7f9288a527b4c2b8acabb2271c38c4d3745d4310/template/python3-flask-debian/index.py#L12-L13