From 8461949bedb7ea04e2ffdff2a4d0365332594742 Mon Sep 17 00:00:00 2001 From: Oleksii Kriuchykhin Date: Tue, 7 May 2019 16:02:45 +0200 Subject: [PATCH] Fix deletion of inconfirmed users [SCI-3351] --- app/models/user_team.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/user_team.rb b/app/models/user_team.rb index 567b4d594..87cc5fd25 100644 --- a/app/models/user_team.rb +++ b/app/models/user_team.rb @@ -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).