fix: show affinity badge for enabled accounts even with 0 clients

- Backend: remove count > 0 filter in GetAccountAffinityCountBatch so
  accounts with 0 bound clients are included in the response
- Frontend: change badge condition from affinityClientCount > 0 to
  account.client_affinity_enabled so the badge always shows for accounts
  with affinity enabled

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
erioandClaude Opus 4.6 committed 2026-03-06 17:00:46 +08:00
1 parent 064a70db29
commit 7fe246b784
2 files changed
+2 -4

No files matched your search

+1 -3
View File
@@ -188,9 +188,7 @@ func (c *gatewayCache) GetAccountAffinityCountBatch(ctx context.Context, account
if err != nil && err != redis.Nil {
continue
}
if count > 0 {
result[id] = count
}
result[id] = count
}
return result, nil
}