bugfix/issue475-orm #476

Merged
deblan merged 4 commits from bugfix/issue475-orm into develop 2026-03-01 13:18:30 +01:00
2 changed files with 4 additions and 4 deletions
Showing only changes of commit 520225603b - Show all commits

fix(admin/*SaveButton): cast settings to string

Simon Vieille 2026-03-01 13:09:02 +01:00
Signed by: deblan
GPG key ID: 579388D585F70417

View file

@ -73,10 +73,10 @@ const save = async () => {
if (Array.isArray(value) || typeof value === 'object') {
value = JSON.stringify(value)
} else if (typeof value === 'boolean') {
value = value ? 1 : 0
value = value ? '1' : '0'
}
OCP.AppConfig.setValue('side_menu', key, value, {
OCP.AppConfig.setValue('side_menu', key, value.toString(), {
success() {
update()
},

View file

@ -69,11 +69,11 @@ const save = async () => {
if (Array.isArray(value) || typeof value === 'object') {
value = JSON.stringify(value)
} else if (typeof value === 'boolean') {
value = value ? 1 : 0
value = value ? '1' : '0'
}
formData.push('name=' + encodeURIComponent(key))
formData.push('value=' + encodeURIComponent(value))
formData.push('value=' + encodeURIComponent(value.toString()))
fetch(url, {
method: 'POST',