Skip to content

Commit 8fd12b8

Browse files
committed
api: fix double defaulting of cache_path
Set `cache_path` only if it's actually defined, setting it to `None` will result the next default to take `None` as the actual value, instead of defaulting to `Path.pwd()`. Signed-off-by: Paul Spooren <mail@aparcar.org>
1 parent b85a0c7 commit 8fd12b8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

asu/api.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,8 @@ def api_build_post():
356356
return response, status
357357

358358
req["store_path"] = current_app.config["STORE_PATH"]
359-
req["cache_path"] = current_app.config.get("CACHE_PATH")
359+
if current_app.config.get("CACHE_PATH"):
360+
req["cache_path"] = current_app.config.get("CACHE_PATH")
360361
req["upstream_url"] = current_app.config["UPSTREAM_URL"]
361362
req["branch_data"] = current_app.config["BRANCHES"][req["branch"]]
362363
req["request_hash"] = request_hash

0 commit comments

Comments
 (0)