huridocs / uwazi

Uwazi is a web-based, open-source solution for building and sharing document collections
http://www.uwazi.io
MIT License
237 stars 79 forks source link

Empty groups on thesaurus #6696

Closed Zasa-san closed 1 month ago

Zasa-san commented 5 months ago

Describe the bug When creating a new thesaurus, you are allowed to create an empty group.

To Reproduce Steps to reproduce the behavior:

  1. Go to thesauri settings screen
  2. Add thesaurus
  3. Add group
  4. Simply put a name to the group and hit Add
  5. If there is no other items, it seems you can save the group, but then you cant edit it to add items. If the thesaurus has items, then it throws an error when trying to save.

Expected behavior Validate that groups cannot be created empty, and when deleting items in a group remove the whole group if it's left with no items.