docs(budget): clarify policy.amount<=0 disables the rule
This commit is contained in:
1 parent
f468f7c238
commit
ba6ba8360b
1 file changed
+1
-1
@@ -100,7 +100,7 @@ export function createBudgetEnforcementService({
|
|||||||
const policies = db.getActivePoliciesForRun(companyId, agentId, projectId);
|
const policies = db.getActivePoliciesForRun(companyId, agentId, projectId);
|
||||||
|
|
||||||
for (const policy of policies) {
|
for (const policy of policies) {
|
||||||
// Guard against division by zero
|
// amount <= 0 disables the policy (and would otherwise divide by zero below).
|
||||||
if (policy.amount <= 0) continue;
|
if (policy.amount <= 0) continue;
|
||||||
|
|
||||||
const spent = db.getSpentInWindow(policy);
|
const spent = db.getSpentInWindow(policy);
|
||||||
|
|||||||
Reference in new issue
Block a user