-
Notifications
You must be signed in to change notification settings - Fork 70
Open
Description
cookcli v0.21.0
While using the server to add/edit panty items, the entered attributes of items are not saved in pantry.conf and as a result will be lost when the pantry page is reloaded. The following behaviour is observed-
- If the pantry item contains name, quantity and any other attributes, ONLY name and quantity are saved to pantry.conf.
- If pantry item contains name and other attributes EXCEPT quantity, these are correctly saved to pantry.conf but any attempt to add quantity will result in behaviour described in the previous point.
I did a little digging and believe the bug may be due to the use of if.. elseif logic in the function write_pantry_item (src/server/handlers/pantry.rs). I made a modification as shown in the Image 1 and it seems to have fixed the issue. I don't mean to propose this "hot-fix" as a solution though, hence reporting it as a bug so it can be looked into properly.
Image 1: Original source code (left), modified code (right)

Thanks!
Kenneth
dubadub
Metadata
Metadata
Assignees
Labels
No labels