2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-30 12:36:45 +00:00

Fix bug in exporting records (#3545) (#3552)

Introduced in #3392

(cherry picked from commit 858d48afe7e68f1da28172dd9e08a87bdba1c34c)

Co-authored-by: miggland <miggland@users.noreply.github.com>
This commit is contained in:
Oliver 2022-08-16 13:08:11 +10:00 committed by GitHub
parent 836ec3289d
commit 951225b420
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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()