From 056968cc397c967532dc5dbf8384d49e9c0a895d Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Sun, 19 May 2024 20:27:12 +0200 Subject: [PATCH] [fix] unit converter operating backwards (from_si <-> to_si) The factors for from_si and to_si were reversed. Closes: https://github.com/searxng/searxng/issues/3497 Signed-off-by: Markus Heiser --- searx/plugins/unit_converter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/searx/plugins/unit_converter.py b/searx/plugins/unit_converter.py index cf8c6ccc3..057e66e78 100644 --- a/searx/plugins/unit_converter.py +++ b/searx/plugins/unit_converter.py @@ -138,8 +138,8 @@ def symbol_to_si(): ( item['symbol'], item['si_name'], - item['to_si_factor'], # from_si - 1 / item['to_si_factor'], # to_si + 1 / item['to_si_factor'], # from_si + item['to_si_factor'], # to_si item['symbol'], ) )