fix: [UI] Modifying push/pull rules fails via the server edit

pull/4493/head
iglocska 2019-04-17 11:17:13 +02:00
parent fa52f40b84
commit 260b156135
2 changed files with 3 additions and 2 deletions

View File

@ -46,7 +46,7 @@ class AppController extends Controller
public $helpers = array('Utility', 'OrgImg', 'FontAwesome');
private $__queryVersion = '65';
private $__queryVersion = '66';
public $pyMispVersion = '2.4.103';
public $phpmin = '7.0';
public $phprec = '7.2';

View File

@ -2957,7 +2957,8 @@ function zeroMQServerAction(action) {
function convertServerFilterRules(rules) {
validOptions.forEach(function (type) {
container = "#"+ modelContext + type.ucfirst() + "Rules";
if($(container).val() != '') rules[type] = JSON.parse($(container).val());
if ($(container).val() != '' && $(container).val() != '[]') rules[type] = JSON.parse($(container).val());
else {rules[type] = {"tags": {"OR": [], "NOT": []}, "orgs": {"OR": [], "NOT": []}}};
});
serverRuleUpdate();
return rules;