diff --git a/app/controllers/api/v1/users_controller.rb b/app/controllers/api/v1/users_controller.rb index 721e8505a..e8b064e9a 100644 --- a/app/controllers/api/v1/users_controller.rb +++ b/app/controllers/api/v1/users_controller.rb @@ -121,7 +121,7 @@ class Api::V1::UsersController < Api::V1::BaseController org_ids = TeamUser.where(user_id: @observe_user.id).pluck(:organization_id) | OrganizationUser.where(user_id: @observe_user.id).pluck(:organization_id) org_count = Organization.where(id: org_ids).count project_count = Project.where(user_id: @observe_user.id).count - render_ok({ org_count: org_count, project_count: project_count }) + render_ok({ can_delete: org_count == 0 && project_count == 0, org_count: org_count, project_count: project_count }) end