diff options
-rw-r--r-- | src/controller.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/controller.c b/src/controller.c index 103f97be5..394110d0a 100644 --- a/src/controller.c +++ b/src/controller.c @@ -1277,9 +1277,17 @@ rspamd_controller_handle_history (struct rspamd_http_connection_entry *conn_ent, row->action)), "action", 0, false); ucl_object_insert_key (obj, ucl_object_fromdouble ( row->score), "score", 0, false); - ucl_object_insert_key (obj, - ucl_object_fromdouble ( - row->required_score), "required_score", 0, false); + + if (!isnan (row->required_score)) { + ucl_object_insert_key (obj, + ucl_object_fromdouble ( + row->required_score), "required_score", 0, false); + } + else { + ucl_object_insert_key (obj, + ucl_object_fromdouble (0.0), "required_score", 0, false); + } + ucl_object_insert_key (obj, ucl_object_fromstring ( row->symbols), "symbols", 0, false); ucl_object_insert_key (obj, ucl_object_fromint ( |