Skip to content

Commit

Permalink
Merge pull request #3448 from manyfold3d/fix-model-merge
Browse files Browse the repository at this point in the history
Fix errors when merging models
  • Loading branch information
Floppy authored Jan 20, 2025
2 parents 09aaff6 + 6d1e049 commit 6132050
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/models/model_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,10 @@ def mesh
memoize :mesh

def reattach!
attachment_attacher.attach attachment, storage: model.library.storage_key
save!
if attachment.id != path_within_library || attachment.storage_key != model.library.storage_key
attachment_attacher.attach attachment, storage: model.library.storage_key
save!
end
end

def convert_to!(format)
Expand Down

0 comments on commit 6132050

Please sign in to comment.