Quote:
Originally Posted by chaley
Get the value with db.get_custom_extra(...)
Set the value with db.set_custom(..., extra=series_index).
|
Thanks.
Quote:
1) your code does not remove duplicates.
|
Agreed - I was pointing out that all I had to do at this point was append tags in the mi (without worrying about duplicates) and let the backend fix things when I did the set_metadata(id, mi).
I was trying to figure out if your set_custom worked the same way as set_metadata (has back end that will remove dupes), and would let me do a simple append, or did I need to handle dupes here.
Quote:
There are two ways to deal with duplicates
|
Thanks, but it appears from your answer that I don't need to.
Also, a part of the question was about differences between get_metadata and get_custom as they related to tag-like text fields. For some reason, I was thinking that because the datatype was set as "text" for simple text fields and for tag-like fields (is_multiple) that all I would be getting for the tag-like data was a single text string, which would include all tag-like entries and their separators.
I was thinking I would have to do a split on the separator character to get them into individual tag-like entries in a list, find dupes myself, put them back into a single string with separators and pass that back.
I haven't checked yet, but from your post (and thinking about it further) I suspect I'm going to get a list when I do a get_custom for an is_multiple text field, not a string with separator characters in it.
I should have done more checking before asking.