You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using TaggitSerializer with TagListSerializerField tags value is not parsed.
I was expecting the same behavior of TagField in forms:
def clean(self, value):
value = super().clean(value)
try:
return parse_tags(value)
except ValueError:
raise forms.ValidationError(
_("Please provide a comma-separated list of tags.")
)
The text was updated successfully, but these errors were encountered:
@bluesurfer here, were you expecting to be able to pass something like "tag_a, tag_b, tag_c" into the serializer? You can already pass in ["tag_a", "tag_b", "tag_c"] and (for backwards compat reasons) "['tag_a', 'tag_b', 'tag_c']".
Forms have their own requirements, but for a REST API it seems a bit odd to be able to pass a comma separated string when you could likely just as easily pass in a list of strings. But I might be lacking imagination on the use case
When using
TaggitSerializer
withTagListSerializerField
tags value is not parsed.I was expecting the same behavior of
TagField
in forms:The text was updated successfully, but these errors were encountered: