diff --git a/app/controllers/invites_controller.rb b/app/controllers/invites_controller.rb index 105258112184a2..ca2aaa3a6a702e 100644 --- a/app/controllers/invites_controller.rb +++ b/app/controllers/invites_controller.rb @@ -49,7 +49,7 @@ def create invite_exists = Invite.where(email: params[:email], invited_by_id: current_user.id).first if invite_exists && !guardian.can_send_multiple_invites?(current_user) - render json: failed_json, status: 422 + return render json: failed_json, status: 422 end begin @@ -71,7 +71,7 @@ def create_invite_link invite_exists = Invite.where(email: params[:email], invited_by_id: current_user.id).first if invite_exists && !guardian.can_send_multiple_invites?(current_user) - render json: failed_json, status: 422 + return render json: failed_json, status: 422 end begin