solvebio/solvebio-python

object.tag() clear existing tags in solvebio 2.11.0

Closed this issue · 1 comments

Hi @jsh2134, @davecap,

I used 2.9.0 previously, so didn't find this before.
If I try to use object.tag() to remove tags in solvebio-python 2.11.0, all object tags are cleaned up.

Example of the code:

obj = dataset.vault_object  # dataset has tags 'current', 'OAPL' etc.
obj.tag(['current'], remove=True, apply_save=True) 
print(obj.tags)   # here it will be empty

The reason is here: https://github.com/solvebio/solvebio-python/blob/master/solvebio/resource/object.py#L504
Old tags rewritten by updated_tags. Maybe set difference operation can be used here?
Thank you!

This change will be included in the next release