akhilrex/hammond

Unable to change fuel quantity type when submitting.

alexanderfitu opened this issue · 1 comments

Please complete the following information

  • Installation Type: [Docker/]
  • Have you tried using the latest docker image / code base [yes/]

Describe the bug
When vehicle type set to "Gallons", you are unable to enter a fill-up log with the fuel quantity value set to "Liters", when you press submit, you receive "AxiosError: Request failed with status code 500"

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'create fillup'
  2. Enter all details, and change the unit type from vehicle default to something else
  3. Press submit

Expected behavior
The calculated fill value should be units X quantity and this should then be entered.

Additional context
This may be an outlying use case, but in the UK we measure our fuel economy in Miles per gallon, but measure and pay for fuel in Liters and £ per litre (which is silly I know).

This means that the fuel economy screen on the vehicle summary shows Miles per Litre which is an unusual unit here. I think a workaround is to change fuel unit under vehicle to "Gallons" to show MPG chart, then back to "Liters" for day to day filling, but I do not know if this has other implications.

As a follow-up, changing the fuel type after adding fill-ups only changes the graph labelling, so not a suitable workaround.