]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Neural: Fix override of the `max_train` -> `max_trains`
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 23 Jun 2020 10:14:26 +0000 (11:14 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 23 Jun 2020 10:14:26 +0000 (11:14 +0100)
src/plugins/lua/neural.lua

index ed7cb4f6c8ebbc3f1cdeb2ad9d5436d2234247fd..e6c52912a8ba594b410213cb3fb1bbbf05ec0d23 100644 (file)
@@ -1411,7 +1411,7 @@ for k,r in pairs(rules) do
   if not rule_elt.name then
     rule_elt.name = k
   end
-  if rule_elt.train.max_train then
+  if rule_elt.train.max_train and not rule_elt.train.max_trains then
     rule_elt.train.max_trains = rule_elt.train.max_train
   end