mirror of
https://github.com/jazzband/django-ddp.git
synced 2026-03-17 06:50:24 +00:00
Don't include null/None reply from method calls in message.
This commit is contained in:
parent
df97966941
commit
7dea154d0d
1 changed files with 4 additions and 1 deletions
|
|
@ -498,7 +498,10 @@ class DDP(APIMixin):
|
|||
return
|
||||
try:
|
||||
result = handler(*params)
|
||||
this.send_msg({'msg': 'result', 'id': id_, 'result': result})
|
||||
msg = {'msg': 'result', 'id': id_}
|
||||
if result is not None:
|
||||
msg['result'] = result
|
||||
this.send_msg(msg)
|
||||
except Exception, err: # log error+stack trace -> pylint: disable=W0703
|
||||
details = traceback.format_exc()
|
||||
this.ws.logger.error(err, exc_info=True)
|
||||
|
|
|
|||
Loading…
Reference in a new issue