From: Vsevolod Stakhov Date: Mon, 3 Jul 2017 18:22:53 +0000 (+0100) Subject: [Minor] Do not overwrite score occasionally X-Git-Tag: 1.6.2~32 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5dfec9ae61f33003aab026b7147b45beede923b5;p=rspamd.git [Minor] Do not overwrite score occasionally --- diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c index b9d8ad56f..de5e57e7e 100644 --- a/src/lua/lua_task.c +++ b/src/lua/lua_task.c @@ -3838,7 +3838,13 @@ lua_task_get_metric_action (lua_State *L) if (task) { if ((metric_res = task->result) != NULL) { - action = rspamd_check_action_metric (task, metric_res); + if (task->result->action == METRIC_ACTION_MAX) { + action = rspamd_check_action_metric (task, metric_res); + } + else { + action = task->result->action; + } + lua_pushstring (L, rspamd_action_to_str (action)); } else {