diff --git a/app/jobs/user_assignments/propagate_assignment_job.rb b/app/jobs/user_assignments/propagate_assignment_job.rb index 730454028..6def574d0 100644 --- a/app/jobs/user_assignments/propagate_assignment_job.rb +++ b/app/jobs/user_assignments/propagate_assignment_job.rb @@ -50,6 +50,9 @@ module UserAssignments end def destroy_user_assignment(object) + # also destroy user designations if it's a MyModule + object.user_my_modules.where(user: @user).destroy_all if object.is_a?(MyModule) + UserAssignment.where(user: @user, assignable: object).destroy_all end end