Skip to content

Commit

Permalink
Merge pull request #2327 from manyfold3d/fix-tag-removal-error
Browse files Browse the repository at this point in the history
Fix tag 404 error when deleting models
  • Loading branch information
Floppy authored Jun 28, 2024
2 parents c06c442 + e13b8aa commit 3a7a287
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/models/model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ def merge_into!(target)
def delete_from_disk_and_destroy
# Trigger deletion for each file separately, to make sure cleanup happens
model_files.each { |f| f.delete_from_disk_and_destroy }
# Remove tags first - sometimes this causes problems if we don't do it beforehand
update!(tags: [])
# Delete directory corresponding to model
FileUtils.remove_dir(absolute_path) if exist?
# Remove from DB
Expand Down

0 comments on commit 3a7a287

Please sign in to comment.