From 4f517bb9fca05544b84503d254c218fccb224974 Mon Sep 17 00:00:00 2001 From: AlexejStukov Date: Wed, 19 Oct 2016 18:25:34 +0200 Subject: [PATCH] check accept fields = '__all__' in serialize_data (#404) --- channels/binding/websockets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/channels/binding/websockets.py b/channels/binding/websockets.py index 4238b2d..46a2fba 100644 --- a/channels/binding/websockets.py +++ b/channels/binding/websockets.py @@ -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