Skip to content

Commit

Permalink
Fix error when merging models
Browse files Browse the repository at this point in the history
caused by dangling datapackage
  • Loading branch information
Floppy committed Mar 5, 2025
1 parent 112364a commit 742ca25
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/models/model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ def merge_into!(target)
end
end
Scan::CheckModelIntegrityJob.set(wait: 5.seconds).perform_later(target.id)
# Remove datapackage
model_files.including_special.find_by(filename: "datapackage.json")&.destroy
# Destroy this model
reload
destroy
end
Expand Down

0 comments on commit 742ca25

Please sign in to comment.