diff --git a/docs/docs/install/config-file.md b/docs/docs/install/config-file.md index 9806af760a..05f2c55f30 100644 --- a/docs/docs/install/config-file.md +++ b/docs/docs/install/config-file.md @@ -123,7 +123,6 @@ The default configuration looks like this: "buttonText": "Login with OAuth", "clientId": "", "clientSecret": "", - "defaultStorageQuota": 0, "enabled": false, "issuerUrl": "", "mobileOverrideEnabled": false, diff --git a/server/src/services/system-config.service.spec.ts b/server/src/services/system-config.service.spec.ts index 176e6d6f04..3abd98e50e 100644 --- a/server/src/services/system-config.service.spec.ts +++ b/server/src/services/system-config.service.spec.ts @@ -112,7 +112,6 @@ const updatedConfig = Object.freeze<SystemConfig>({ buttonText: 'Login with OAuth', clientId: '', clientSecret: '', - defaultStorageQuota: 0, enabled: false, issuerUrl: '', mobileOverrideEnabled: false, diff --git a/server/src/utils/misc.spec.ts b/server/src/utils/misc.spec.ts index 3c45482938..89433f3794 100644 --- a/server/src/utils/misc.spec.ts +++ b/server/src/utils/misc.spec.ts @@ -17,10 +17,6 @@ describe('getKeysDeep', () => { ).toEqual(['foo', 'flag', 'count', 'date']); }); - it('should skip undefined properties', () => { - expect(getKeysDeep({ foo: 'bar', hello: undefined })).toEqual(['foo']); - }); - it('should skip array indices', () => { expect(getKeysDeep({ foo: 'bar', hello: ['foo', 'bar'] })).toEqual(['foo', 'hello']); expect(getKeysDeep({ foo: 'bar', nested: { hello: ['foo', 'bar'] } })).toEqual(['foo', 'nested.hello']); diff --git a/web/src/lib/components/shared-components/settings/setting-input-field.spec.ts b/web/src/lib/components/shared-components/settings/setting-input-field.spec.ts index 80cb920074..cf5c9282a5 100644 --- a/web/src/lib/components/shared-components/settings/setting-input-field.spec.ts +++ b/web/src/lib/components/shared-components/settings/setting-input-field.spec.ts @@ -34,6 +34,7 @@ describe('SettingInputField component', () => { label: 'test-number-input', inputType: SettingInputFieldType.NUMBER, value: 5, + required: true, }, }); const user = userEvent.setup(); diff --git a/web/src/lib/components/shared-components/settings/setting-input-field.svelte b/web/src/lib/components/shared-components/settings/setting-input-field.svelte index 6633086566..e07eae05f0 100644 --- a/web/src/lib/components/shared-components/settings/setting-input-field.svelte +++ b/web/src/lib/components/shared-components/settings/setting-input-field.svelte @@ -56,7 +56,11 @@ if (newValue > max) { newValue = max; } - value = value === '' ? undefined : newValue; + if (!required && value === '') { + value = undefined; + } else { + value = newValue; + } } };