https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482

--- Comment #70 from Jonathan Druart <[email protected]> 
---
This is what I had in mind.

@ admin/searchengine/elasticsearch/mappings.pl:119 @ if ( $op eq 'edit' ) {
             }
             elsif ($field_weight <= 0 || !looks_like_number($field_weight)) {
                 push @messages, { type => 'error', code =>
'invalid_field_weight', 'weight' => $field_weight };
+                $errors++;
             }
             else {
                 $search_field->weight($field_weight);
@ admin/searchengine/elasticsearch/mappings.pl:165 @ if ( $op eq 'edit' ) {
                 search => $mapping_search
             });
         }
-        push @messages, { type => 'error', code => 'missing_mandatory_fields'
} if $mandatory_after < $mandatory_before;
+        if ( $mandatory_after < $mandatory_before ) {
+            push @messages, { type => 'error', code =>
'missing_mandatory_fields' };
+            $error++;
+        }
     };
-    if ($@ || @messages) {
+    if ($@ || $errors) {
         push @messages, { type => 'error', code => 'error_on_update', message
=> $@, };
         $schema->storage->txn_rollback;
     } else {

Will see later if we need it.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to