check accept fields = '__all__' in serialize_data (#404)

This commit is contained in:
AlexejStukov 2016-10-19 18:25:34 +02:00 committed by Andrew Godwin
parent b9d2f534c4
commit 4f517bb9fc

View File

@ -56,7 +56,7 @@ class WebsocketBinding(Binding):
Serializes model data into JSON-compatible types.
"""
if self.fields is not None:
if list(self.fields) == ['__all__']:
if self.fields == '__all__' or list(self.fields) == ['__all__']:
fields = None
else:
fields = self.fields