mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Remove temp. file at end of export process
This commit is contained in:
parent
90c7849baa
commit
4cb3cd3831
4
tasks.py
4
tasks.py
@ -328,7 +328,9 @@ def export_records(c, filename='data.json', overwrite = False):
|
||||
with open(filename, "w") as f_out:
|
||||
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])
|
||||
|
Loading…
Reference in New Issue
Block a user