Skip to content

Cannot remove icon from category. #9182

Closed

Description

@fjpanag

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

  1. Create a new part category.
  2. Edit it to add an icon.
  3. Edit it again to remove the icon.
  4. 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.

Relevant log output

Activity

  1. added
    bug
    question
    triage:not-checked
    on Feb 25, 2025
  2. SchrodingersGat commented on Feb 25, 2025

    @SchrodingersGat
    Member

    @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

  3. removed
    triage:not-checked
    on Feb 25, 2025
  4. added this to the 1.0.0 milestone on Feb 25, 2025
  5. added theissue type on Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugquestion

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions