From 951225b420cb72ebb7b1c0e0e16ac03f8f0b7c3f Mon Sep 17 00:00:00 2001 From: Oliver Date: Tue, 16 Aug 2022 13:08:11 +1000 Subject: [PATCH] Fix bug in exporting records (#3545) (#3552) Introduced in #3392 (cherry picked from commit 858d48afe7e68f1da28172dd9e08a87bdba1c34c) Co-authored-by: miggland --- tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks.py b/tasks.py index 86041f63e3..8f69328512 100644 --- a/tasks.py +++ b/tasks.py @@ -264,7 +264,7 @@ def export_records(c, filename='data.json', overwrite=False, include_permissions print(f"Exporting database records to file '{filename}'") - if filename.exists() and overwrite is False: + if Path(filename).is_file() and overwrite is False: response = input("Warning: file already exists. Do you want to overwrite? [y/N]: ") response = str(response).strip().lower()