Error:
“Got KeyError when attempting to get a value for field tags on serializer BookSerializer.\nThe serializer field might be named incorrectly and not match any attribute or key on the OrderedDict instance.\nOriginal exception text was: ‘tags’.”
Serializer class
book.tags.add(tag_obj) # Having an error in this line
Here I guess, tag_obj is being added to the book instance (id: uuid, tag: something) but I want my response model like,
{ ....
tags: ['lesson']
}
not
tags: {
id: uuid,
name: 'lesson'
}
Thanks for your kind response sir.