From 4e4313723e8a20f4f49b8d5312f4b050524fcbf4 Mon Sep 17 00:00:00 2001 From: Owen Date: Mon, 17 Aug 2026 17:00:08 -0500 Subject: [PATCH] Fix quantity sent as string when saving an asset submitAssetForm() converted item_type_id/folder_id/status_id/ assigned_user_id from FormData's string values to numbers before JSON-encoding the payload, but missed quantity, so it stayed a string and the server's json.Decode into assetRequest.Quantity (int) rejected it as "cannot unmarshal string into Go struct field". --- web/static/js/app.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/web/static/js/app.js b/web/static/js/app.js index e4fc14e..3935e82 100644 --- a/web/static/js/app.js +++ b/web/static/js/app.js @@ -713,6 +713,8 @@ payload.status_id = Number(value); } else if (key === 'assigned_user_id') { payload.assigned_user_id = value ? Number(value) : null; + } else if (key === 'quantity') { + payload.quantity = Number(value) || 0; } else { payload[key] = value; }