mirror of
https://github.com/django/daphne.git
synced 2025-07-30 00:49:44 +03:00
Remove encode/decode overhead at binding (#611)
This commit is contained in:
parent
585c093352
commit
a0cbccfebc
|
@ -112,8 +112,7 @@ class WebsocketBinding(Binding):
|
||||||
"fields": data,
|
"fields": data,
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
# TODO: Avoid the JSON roundtrip by using encoder directly?
|
return list(serializers.deserialize("python", s_data))[0]
|
||||||
return list(serializers.deserialize("json", json.dumps(s_data)))[0]
|
|
||||||
|
|
||||||
def create(self, data):
|
def create(self, data):
|
||||||
self._hydrate(None, data).save()
|
self._hydrate(None, data).save()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user