Fix deletion of inconfirmed users [SCI-3351]

This commit is contained in:
Oleksii Kriuchykhin 2019-05-07 16:02:45 +02:00
parent 49a790c50a
commit 8461949bed

View file

@ -40,6 +40,7 @@ class UserTeam < ApplicationRecord
end
def destroy(new_owner)
return super() unless new_owner
# If any project of the team has the sole owner and that
# owner is the user to be removed from the team, then we must
# create a new owner of the project (the provided user).