summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2024-05-19 20:27:12 +0200
committerMarkus Heiser <markus.heiser@darmarIT.de>2024-05-28 11:58:13 +0200
commit056968cc397c967532dc5dbf8384d49e9c0a895d (patch)
tree0ad1e5d06163fed3638688082f732e5ced13cef4
parent99d6f516268425036a44e26c64135ae04e0c1e01 (diff)
downloadsearxng-056968cc397c967532dc5dbf8384d49e9c0a895d.tar.gz
searxng-056968cc397c967532dc5dbf8384d49e9c0a895d.zip
[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 <markus.heiser@darmarit.de>
-rw-r--r--searx/plugins/unit_converter.py4
1 files 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'],
)
)