diff --git a/channels/binding/base.py b/channels/binding/base.py index 672b5a3..c7b4ba0 100644 --- a/channels/binding/base.py +++ b/channels/binding/base.py @@ -97,9 +97,9 @@ class Binding(object): self = cls() self.instance = instance # Check to see if we're covered - assert self.stream is not None payload = self.serialize(instance, action) if payload != {}: + assert self.stream is not None message = WebsocketDemultiplexer.encode(self.stream, payload) for group_name in self.group_names(instance, action): group = Group(group_name)