mirror of
https://github.com/inventree/InvenTree.git
synced 2026-11-23 08:16:14 +00:00
Remove temp. file at end of export process
This commit is contained in:
1 parent
90c7849baa
commit
4cb3cd3831
1 file changed
+3
-1
@@ -328,7 +328,9 @@ def export_records(c, filename='data.json', overwrite = False):
|
|||||||
with open(filename, "w") as f_out:
|
with open(filename, "w") as f_out:
|
||||||
f_out.write(json.dumps(data, indent=2))
|
f_out.write(json.dumps(data, indent=2))
|
||||||
|
|
||||||
print("Data export completed")
|
print("Data export completed. Removing temporary files")
|
||||||
|
|
||||||
|
os.remove(tmpfile)
|
||||||
|
|
||||||
|
|
||||||
@task(help={'filename': 'Input filename', 'clear': 'Clear existing data before import'}, post=[rebuild_models, rebuild_thumbnails])
|
@task(help={'filename': 'Input filename', 'clear': 'Clear existing data before import'}, post=[rebuild_models, rebuild_thumbnails])
|
||||||
|
|||||||
Reference in new issue
Block a user