biobricks / bionet-2

The bionet web app
3 stars 2 forks source link

Deleting something from favorites actually completely deletes it! #102

Closed Juul closed 7 years ago

Juul commented 7 years ago

Tried this is endylab.stanford.edu and we lost one of the freezers!

autonomous1 commented 7 years ago

Is there a rpc method that deletes a favorite symlink to a physical? Maybe I missed it but I didn't see a delete favorite method when I checked just now. I will go ahead and filter favorites from the delete function to avoid the possibility of accidentally deleting something like an entire lab.

Juul commented 7 years ago

This is now fixed. If you look at what is returned by remote.favLocationsTree() you'll see that it's a series of objects with the properties .favorite and .material. The .material property is the actual favorited physical and the .favorite is the reference from the favorites list. You were deleting the .material rather than the .favorite.