Fix keywords returning 0 with empty list

This commit is contained in:
= 2025-01-02 11:00:04 -05:00
parent 59b9222b78
commit cfe93e902d

View File

@ -170,7 +170,7 @@
{% block js %} {% block js %}
<script> <script>
function replacer(key, value) { 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) { if (value == 0) {
return [] return []
} else { } else {
@ -199,6 +199,7 @@
formDataObject.disabled_language_files = $('#lang_select').val(); formDataObject.disabled_language_files = $('#lang_select').val();
formDataObject.monitored_mounts = $('#mount_select').val(); formDataObject.monitored_mounts = $('#mount_select').val();
formDataObject.keywords = $('#keywords').val().split(","); formDataObject.keywords = $('#keywords').val().split(",");
console.log(formDataObject.keywords)
$('#config-form input[type="radio"]:checked').each(function () { $('#config-form input[type="radio"]:checked').each(function () {
if ($(this).val() == 'True') { if ($(this).val() == 'True') {
formDataObject[this.name] = true; formDataObject[this.name] = true;