commit c07ae87: [Minor] Neural: Fix override of the `max_train` -> `max_trains`

Vsevolod Stakhov vsevolod at highsecure.ru
Tue Jun 23 10:28:06 UTC 2020


Author: Vsevolod Stakhov
Date: 2020-06-23 11:14:26 +0100
URL: https://github.com/rspamd/rspamd/commit/c07ae87e906329d41fc9f785cf0509e1177dee94

[Minor] Neural: Fix override of the `max_train` -> `max_trains`

---
 src/plugins/lua/neural.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/plugins/lua/neural.lua b/src/plugins/lua/neural.lua
index ed7cb4f6c..e6c52912a 100644
--- a/src/plugins/lua/neural.lua
+++ b/src/plugins/lua/neural.lua
@@ -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
 


More information about the Commits mailing list