live settings: treat empty string as empty value (#805)

This commit is contained in:
Vadim Stepanov 2022-11-08 15:41:12 +00:00 committed by GitHub
parent 6d097b648d
commit cd39b67ef1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -38,7 +38,7 @@ class LiveSettingValidator:
def get_error(self):
check_fn_name = f"_check_{self.live_setting.name.lower()}"
if self.live_setting.value is None:
if self.live_setting.value in (None, ""):
return "Empty"
# skip validation if there's no handler for it

View file

@ -1,7 +1,7 @@
import { NULL_VALUE } from './LiveSettings.config';
export function normalizeValue(value: string) {
if (value === null) {
if (value === null || value === '') {
return NULL_VALUE;
}