Skip to content

fix: send null for unlimited user limit#3090

Merged
TorstenDittmann merged 3 commits into
mainfrom
fix-user-limit-unlimited-null
Jun 22, 2026
Merged

fix: send null for unlimited user limit#3090
TorstenDittmann merged 3 commits into
mainfrom
fix-user-limit-unlimited-null

Conversation

@TorstenDittmann

Copy link
Copy Markdown
Contributor

What

  • Send null instead of 0 when updating the project user limit to unlimited.

Why

  • The API expects null to disable the user limit.

Testing

  • bun run check

@greptile-apps

greptile-apps Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes the user limit API call to send null instead of 0 when disabling the project user limit, matching the API's write contract. The read-side comparisons against 0 are intentionally preserved since the API response returns 0 for unlimited.

  • updateUsersLimit.svelte: changes total: isLimited ? newLimit : 0 to total: isLimited ? newLimit : null on the write path — a minimal, targeted fix.
  • database-[database]/+page.svelte: cosmetic whitespace-only change to attribute formatting, no functional impact.

Confidence Score: 5/5

Safe to merge. The write-side fix correctly sends null to disable the user limit, and the read-side zero checks are intentional per the API's response contract.

The change is a single-line fix that aligns the write payload with the documented API contract. The read-side logic remains correct because the API returns 0 (not null) for unlimited policies. The second file change is purely cosmetic.

No files require special attention.

Important Files Changed

Filename Overview
src/routes/(console)/project-[region]-[project]/auth/security/updateUsersLimit.svelte Fixes the write payload for disabling the user limit: sends null instead of 0, aligning with the API's write contract. Read-side zero checks are intentionally unchanged since the API response still returns 0 for unlimited.
src/routes/(console)/project-[region]-[project]/databases/database-[database]/+page.svelte Cosmetic-only change: moves the closing > of an ariaLabel attribute to a new line, no functional impact.

Reviews (3): Last reviewed commit: "fix: format database page to satisfy pre..." | Re-trigger Greptile

Co-authored-by: TorstenDittmann <1759475+TorstenDittmann@users.noreply.github.com>
@TorstenDittmann

Copy link
Copy Markdown
Contributor Author

@greptile-apps thanks for the review. The API expects null on write to disable the user limit, but the policy response still returns 0 for disabled/unlimited. Keeping the read-side policy.total === 0 checks is intentional and matches the current response contract.

Can you re-review with that context?

@TorstenDittmann TorstenDittmann merged commit 5005d79 into main Jun 22, 2026
4 checks passed
@TorstenDittmann TorstenDittmann deleted the fix-user-limit-unlimited-null branch June 22, 2026 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants