Skip to content

Commit 99177d9

Browse files
committed
chore(billing): match to_jsonb int cast between claim and re-arm for consistency
1 parent d915407 commit 99177d9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

apps/sim/lib/billing/core/limit-notifications.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ async function rearmThreshold(
7272
id: string,
7373
category: LimitCategory
7474
): Promise<void> {
75-
const setExpr = sql`jsonb_set(coalesce(${scope === 'user' ? userStats.limitNotifications : organization.limitNotifications}, '{}'::jsonb), ARRAY[${category}], to_jsonb(0))`
75+
const setExpr = sql`jsonb_set(coalesce(${scope === 'user' ? userStats.limitNotifications : organization.limitNotifications}, '{}'::jsonb), ARRAY[${category}], to_jsonb(0::int))`
7676
const onlyIfArmed =
7777
scope === 'user'
7878
? sql`coalesce((${userStats.limitNotifications} ->> ${category})::int, 0) > 0`

0 commit comments

Comments
 (0)