diff --git a/application/src/main/java/org/thingsboard/server/service/apiusage/TenantApiUsageState.java b/application/src/main/java/org/thingsboard/server/service/apiusage/TenantApiUsageState.java index fd4ef96122..a8e229933f 100644 --- a/application/src/main/java/org/thingsboard/server/service/apiusage/TenantApiUsageState.java +++ b/application/src/main/java/org/thingsboard/server/service/apiusage/TenantApiUsageState.java @@ -181,7 +181,7 @@ public class TenantApiUsageState { long threshold = getProfileThreshold(recordKey); long warnThreshold = getProfileWarnThreshold(recordKey); ApiUsageStateValue tmpValue; - if (threshold == 0 || value < warnThreshold) { + if (threshold == 0 || value == 0 || value < warnThreshold) { tmpValue = ApiUsageStateValue.ENABLED; } else if (value < threshold) { tmpValue = ApiUsageStateValue.WARNING;