Steps to reproduce:
- Remove a category; do not press 'Save' yet
- Add a new category, give it the exact same name as the one you just removed
- Click the 'Save' button
- Notice you get an error stating "Category names must be unique"
If you were to have clicked 'Save' in between the delete and the add, it would work just fine. However, this is not intuitive to end users, and it may seem as though it's a bug in the system.
This problem is half process/user error, half logic error; however we can make an improvement to avoid this, by reversing the logic in the back end method. Process the deletes first, then do the adds.