Support returning empty list as reponse
This commit is contained in:
parent
c866932861
commit
c7d94548be
1 changed files with 2 additions and 2 deletions
|
@ -226,7 +226,7 @@ class UiWebsocket(object):
|
||||||
def asyncErrorWatcher(func, *args, **kwargs):
|
def asyncErrorWatcher(func, *args, **kwargs):
|
||||||
try:
|
try:
|
||||||
result = func(*args, **kwargs)
|
result = func(*args, **kwargs)
|
||||||
if result:
|
if result is not None:
|
||||||
self.response(args[0], result)
|
self.response(args[0], result)
|
||||||
except Exception, err:
|
except Exception, err:
|
||||||
if config.debug: # Allow websocket errors to appear on /Debug
|
if config.debug: # Allow websocket errors to appear on /Debug
|
||||||
|
@ -270,7 +270,7 @@ class UiWebsocket(object):
|
||||||
else:
|
else:
|
||||||
result = func(req["id"])
|
result = func(req["id"])
|
||||||
|
|
||||||
if result:
|
if result is not None:
|
||||||
self.response(req["id"], result)
|
self.response(req["id"], result)
|
||||||
|
|
||||||
# Format site info
|
# Format site info
|
||||||
|
|
Loading…
Reference in a new issue