diff options
author | Daniel Schadt <kingdread@gmx.de> | 2022-07-23 16:58:56 +0200 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2022-07-23 16:58:56 +0200 |
commit | b90df4386327221dbf14acdddd2ca9706f0cdb41 (patch) | |
tree | e9189561b1c18c7211d0c4cdf8e8034d0195bda8 /tests/unit/views/test_browse.py | |
parent | b07f07c96f88c5e9be9aaf05feed8ef790076482 (diff) | |
download | fietsboek-b90df4386327221dbf14acdddd2ca9706f0cdb41.tar.gz fietsboek-b90df4386327221dbf14acdddd2ca9706f0cdb41.tar.bz2 fietsboek-b90df4386327221dbf14acdddd2ca9706f0cdb41.zip |
stringify path before passing it to FileResponse
Depending on the Python version, this might raise an error: Before 3.8,
mimetypes.guess_type could not deal with a pathlib.Path, and only
accepted a string. guess_type is called internally by FileResponse, so
to make sure we don't run into errors, we stringify the path before
passing it to FileResponse.
Diffstat (limited to 'tests/unit/views/test_browse.py')
0 files changed, 0 insertions, 0 deletions