mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2025-01-31 04:46:11 +01:00
Merge branch 'bugfix/null-keyword' into 'dev'
Empty Keyword List See merge request crafty-controller/crafty-4!819
This commit is contained in:
commit
83dcbe4ed0
@ -9,6 +9,7 @@ TBD
|
||||
### Bug fixes
|
||||
- Bump requests to resolve yank for CVE-2024-35195 ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/808))
|
||||
- Better handle malformed mcping data ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/799))
|
||||
- Resolves type issue when posting no keywords in the "keyword" field in config.json tab ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/819))
|
||||
### Tweaks
|
||||
- Dyamically change child action translation for backups ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/806))
|
||||
- Remove EXIF image data on app Background Photos ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/805))
|
||||
|
@ -148,7 +148,7 @@
|
||||
{% block js %}
|
||||
<script>
|
||||
function replacer(key, value) {
|
||||
if (key == "disabled_language_files" || key == "monitored_mounts") {
|
||||
if (key == "disabled_language_files" || key == "monitored_mounts" || key == "keywords") {
|
||||
if (value == 0) {
|
||||
return []
|
||||
} else {
|
||||
@ -177,6 +177,7 @@
|
||||
formDataObject.disabled_language_files = $('#lang_select').val();
|
||||
formDataObject.monitored_mounts = $('#mount_select').val();
|
||||
formDataObject.keywords = $('#keywords').val().split(",");
|
||||
|
||||
$('#config-form input[type="radio"]:checked').each(function () {
|
||||
if ($(this).val() == 'True') {
|
||||
formDataObject[this.name] = true;
|
||||
@ -184,12 +185,10 @@
|
||||
formDataObject[this.name] = false;
|
||||
}
|
||||
});
|
||||
console.log(formDataObject);
|
||||
|
||||
// Format the plain form data as JSON
|
||||
let formDataJsonString = JSON.stringify(formDataObject, replacer);
|
||||
|
||||
console.log(formDataJsonString);
|
||||
|
||||
let res = await fetch(`/api/v2/crafty/config/`, {
|
||||
method: 'PATCH',
|
||||
headers: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user