Skip to content

Commit

Permalink
fix: avoid name conflicts during file upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Rohan Bansal committed Feb 20, 2024
1 parent 605aae6 commit 8308931
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cloud_storage/cloud_storage/overrides/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ def upload_file(file: File) -> File:
except Exception as e:
frappe.log_error("File Upload Error", e)
file.db_set("s3_key", path)
if not file.name:
if frappe.flags.cloud_storage and not file.name:
file.save()
return file

Expand Down

0 comments on commit 8308931

Please sign in to comment.