Always return array from jsonrpc_get_lbry_files()

Before, would return false when there were no files in the DB.
This commit is contained in:
Alex Liebowitz 2016-11-16 23:56:57 -05:00
parent 0490250da4
commit e03db79f79

View file

@ -1325,8 +1325,7 @@ class Daemon(AuthJSONRPCServer):
"""
d = self._get_lbry_files()
d.addCallback(lambda r: [d[1] for d in r])
d.addCallback(lambda r: self._render_response(r, OK_CODE) if len(r) else self._render_response(False, OK_CODE))
d.addCallback(lambda r: self._render_response([d[1] for d in r], OK_CODE))
return d