Skip to content

Commit 71d3411

Browse files
committed
made SyncFromDisk throw an exception if blob creation fails.
1 parent 8269566 commit 71d3411

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/models/sync_from_disk.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def create_blob_and_file(entry, blob_attr, entry_files_path)
164164
end
165165
blob_attr["metadata"]["analyzed"] = true
166166

167-
blob = ActiveStorage::Blob.create(blob_attr)
167+
blob = ActiveStorage::Blob.create!(blob_attr)
168168
blob.upload_without_unfurling(File.open(new_attachment_filepath))
169169

170170
entry.files.create(blob_id: blob.id, created_at: blob.created_at)

0 commit comments

Comments
 (0)