Skip to content

Commit

Permalink
chore: fix issue with unit folders from tests
Browse files Browse the repository at this point in the history
Make sure they are all deleted.
  • Loading branch information
macite committed Jan 20, 2025
1 parent 2df2bf4 commit 58b01fa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/models/unit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,10 @@ def role_for(user)
# Ensure before destroy is above relations - as this needs to clear main convenor before unit roles are deleted
before_destroy do
update(main_convenor_id: nil)
delete_associated_files
end

after_destroy :delete_associated_files

after_update :move_files_on_code_change, if: :saved_change_to_code?
after_update :propogate_date_changes_to_tasks, if: :saved_change_to_start_date?

Expand Down

0 comments on commit 58b01fa

Please sign in to comment.