I have a custom field like this:
class TagField(serializers.RelatedField):
def to_representation(self, value):
resp = {
'name': value.name,
'categoryid': value.categoryid.pk
}
return resp
I'm getting an error which says 'dict' object is not hashable. Why does this happen? How can I get it to work?