Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit Converter Operating Backwards #3497

Closed
PeanutAcoustics opened this issue May 19, 2024 · 1 comment · Fixed by #3499
Closed

Unit Converter Operating Backwards #3497

PeanutAcoustics opened this issue May 19, 2024 · 1 comment · Fixed by #3499
Labels
bug Something isn't working

Comments

@PeanutAcoustics
Copy link

Version of SearXNG, commit number if you are using on master branch and stipulate if you forked SearXNG

Unforked

How did you install SearXNG?

Docker

What happened?

Unit converter in PR #3378 seems to be operating in reverse when handling conversions, resulting in things like 16 pounds per ounce and 1000 kilograms per gram

How To Reproduce

Attempt to use unit converter, ex. gram to kilogram or pounds to ounces

Expected behavior

A conversion of 1 kilogram to 1000 grams or vice versa

Screenshots & Logs

Screenshot 2024-05-19 at 12 16 46 AM Screenshot 2024-05-19 at 12 17 00 AM Screenshot 2024-05-19 at 12 17 13 AM

Additional context

@PeanutAcoustics PeanutAcoustics added the bug Something isn't working label May 19, 2024
return42 added a commit to return42/searxng that referenced this issue May 19, 2024
The factors for from_si and to_si were reversed.

Closes: searxng#3497
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
@return42
Copy link
Member

return42 commented May 19, 2024

Thanks for pointing out .. I send PR #3499 to fix / can you test it / thanks 👍

return42 added a commit that referenced this issue May 28, 2024
The factors for from_si and to_si were reversed.

Closes: #3497
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants