Commit 84bb52bb authored by Robert's avatar Robert

Merge remote-tracking branch 'origin/fix-poll-vote-failure'

parents 3cfb42fa c54a557a
......@@ -35,6 +35,12 @@ class GestaltOrAnonSerializer(serializers.Serializer):
# todo validate name if no valid id was provided
return data
def run_validators(self, value):
""" the 'run_validators' method of serializers.Serializer seems to expect a dict """
if not isinstance(value, dict):
value = {'id': value.id, 'name': value.name}
return super().run_validators(value)
class Meta:
fields = ('id', 'name')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment