Open Areyes42 opened 5 months ago
Ya good catch, the error dialog that pops up before refreshing the page has always been happening. There isn't any problems with add/deleting the ranks. The pop up is just hard to debug on the front-end because the page refreshes so quickly. It's probably not a real issue for 7.9.6.
@acwhite211 You'll need to confirm, but it very likely chokes below https://github.com/specify/specify7/blob/c62b400cec7732b856e25451df042bb8898a0d51/specifyweb/specify/api.py#L636
Set a breakpoint below for that. https://github.com/specify/specify7/blob/c62b400cec7732b856e25451df042bb8898a0d51/specifyweb/specify/api.py#L635
I think it is a real bug, but one that maybe non-trivial to fix.
Was going to work on fixing the refresh bug, but didn't get time. For now, comment out this line (or well, remove the reload call) https://github.com/specify/specify7/blob/c62b400cec7732b856e25451df042bb8898a0d51/specifyweb/frontend/js_src/lib/components/TreeView/Tree.tsx#L272
The root of the bug is not specific to tree ranks (any place that deletes dependent to-many will have that bug). For now, showing the error dialog. Will be useful for future anyways (to get crash report or pretty format the dialog)
Can recreate in edge (7.9.6)
Describe the bug A brief error message appears when attempting to delete tree ranks associated with a node via the Storage Tree Def Items menu.
To Reproduce Steps to reproduce the behavior:
Expected behavior When attempting to delete a tree rank that has associated nodes, a save blocker should be enforced, similar to the mechanism used when deleting with the pencil button.
Screenshots
https://github.com/specify/specify7/assets/130881183/9be2bca7-d115-4c8f-9740-80db12e9492b
Please, also fill out the following information manually: