2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 13:05:42 +00:00

Fix/settings bugs and added model SettingKeyType typing (#4944)

* fix .gitignore and spelling issues

* Fix setting get not cached correctly

* Add model to settings key type

* Fix plugin setting slug url

* Fix typo

* Fix resetting of related setting field

* Improved model comment
This commit is contained in:
Lukas
2023-06-01 15:53:06 +02:00
committed by GitHub
parent 037654610e
commit 4d9e92011e
5 changed files with 23 additions and 12 deletions

View File

@ -111,8 +111,13 @@ function editSetting(key, options={}) {
return data;
},
processBeforeUpload: function(data) {
// Convert value to string
data.value = data.value.toString();
if(response.type === 'related field' && data.value === null) {
// related fields throw an error because they are set to null on delete
data.value = "";
} else {
// Convert value to string
data.value = data.value.toString();
}
return data;
},