2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 04:55:44 +00:00

Improve unit conversion (#5658)

- In previous implementation, could not have a value "10k" for a unit of "m"
- Now, correct result is obtained (10k [m] = 10[km])
- Still passes all previous unit tests
- Simpler code, too
This commit is contained in:
Oliver
2023-10-04 17:28:20 +11:00
committed by GitHub
parent c18bc4e1d1
commit ffda700244
4 changed files with 71 additions and 58 deletions

View File

@ -257,6 +257,10 @@ function showApiError(xhr, url) {
title = '{% trans "Error 408: Timeout" %}';
message = '{% trans "Connection timeout while requesting data from server" %}';
break;
case 503:
title = '{% trans "Error 503: Service Unavailable" %}';
message = '{% trans "The server is currently unavailable" %}';
break;
default:
title = '{% trans "Unhandled Error Code" %}';
message = `{% trans "Error code" %}: ${xhr.status}`;