]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix logging
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 17 Aug 2019 08:10:24 +0000 (09:10 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 17 Aug 2019 08:10:24 +0000 (09:10 +0100)
src/plugins/lua/settings.lua

index 237ed41be4341bc61e1940b4dbea653af0c0c519..e28473b5bc9eb005b0929ac2f4204ffe23b9e5c3 100644 (file)
@@ -105,8 +105,10 @@ local function check_query_settings(task)
     local parser = ucl.parser()
     local res,err = parser:parse_string(tostring(query_set))
     if res then
-      rspamd_logger.warnx(task, "both settings-id '%s' and settings headers are presented, ignore settings-id; ",
-          tostring(settings_id))
+      if settings_id then
+        rspamd_logger.warnx(task, "both settings-id '%s' and settings headers are presented, ignore settings-id; ",
+            tostring(settings_id))
+      end
       local settings_obj = parser:get_object()
       apply_settings(task, settings_obj, nil)