Skip to content

Conversation

@jrasm91
Copy link
Member

@jrasm91 jrasm91 commented Aug 25, 2025

Fixes #20982

  • Set an input step of 1 on both storage quota inputs
  • Enforce whole numbers in the api
  • Add tests for the controller validation

@bo0tzz
Copy link
Member

bo0tzz commented Aug 26, 2025

Do we not want to allow <1 quotas?

@danieldietzler
Copy link
Member

Do we not want to allow <1 quotas?

This allows to set 0 as a valid quota, no?

@bo0tzz
Copy link
Member

bo0tzz commented Aug 26, 2025

yes, but I mean specifically sub-gigabyte nonzero quotas.

@jrasm91
Copy link
Member Author

jrasm91 commented Aug 26, 2025

This main thing is that this fixes the API validation to require whole numbers (in bytes), which removes the database error.

I think the UI can accept decimal numbers but I don't want to work on that. It involves more code changes in several places to handle rounding to the nearest byte and such.

@jrasm91 jrasm91 merged commit 70e59c0 into main Aug 26, 2025
111 of 118 checks passed
@jrasm91 jrasm91 deleted the fix/20982 branch August 26, 2025 18:46
ollioddi pushed a commit to ollioddi/immich that referenced this pull request Aug 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Default storage quota should not accept decimals

4 participants