Repository navigation
Description
Please verify that this bug has NOT been raised before.
- I checked and didn't find a similar issue
Describe the bug*
The category icon is marked as an optional field. Indeed, you can create a part category without specifying one.
I created a category, and at a later time I edited it to add an icon.
Then, I changed my mind and wanted to remove the icon. However, saving the edited category throws an error, stating that the icon field cannot be null (although it is optional).
Steps to Reproduce
- Create a new part category.
- Edit it to add an icon.
- Edit it again to remove the icon.
- Saving is impossible because the icon cannot be null.
Expected behaviour
The expected behaviour is to be able to remove the icon, since it is optional.
Deployment Method
- Docker
- Package
- Bare metal
- Other - added info in Steps to Reproduce
Version Information
InvenTree-Version: 0.17.7
Django Version: 4.2.17
Commit Hash: 28726db
Commit Date: 2025-02-13
Commit Branch: null
Database: postgresql
Debug-Mode: False
Deployed using Docker: True
Platform: Linux-5.14.0-503.26.1.el9_5.x86_64-x86_64-with
Installer: DOC
nullActive plugins: [{"name":"InvenTreeBarcode","slug":"inventreebarcode","version":"2.1.0"},{"name":"InvenTreeCoreNotificationsPlugin","slug":"inventreecorenotificationsplugin","version":"1.0.0"},{"name":"InvenTreeCurrencyExchange","slug":"inventreecurrencyexchange","version":"1.0.0"},{"name":"InvenTreeLabel","slug":"inventreelabel","version":"1.1.0"},{"name":"InvenTreeLabelMachine","slug":"inventreelabelmachine","version":"1.0.0"},{"name":"InvenTreeLabelSheet","slug":"inventreelabelsheet","version":"1.0.0"},{"name":"DigiKeyPlugin","slug":"digikeyplugin","version":"1.0.0"},{"name":"LCSCPlugin","slug":"lcscplugin","version":"1.0.0"},{"name":"MouserPlugin","slug":"mouserplugin","version":"1.0.0"},{"name":"TMEPlugin","slug":"tmeplugin","version":"1.0.0"}]
Please verify if you can reproduce this bug on the demo site.
- I can reproduce this bug on the demo site.
Activity
Allow custom icons to be cleared
SchrodingersGat commentedon Feb 25, 2025
@fjpanag thanks for reporting! A fix is incoming in #9185
As this requires a database migration the fix will not be available until the next stable release cycle
Allow custom icons to be cleared (inventree#9185)