1
0
Fork 0
mirror of synced 2024-05-20 12:32:26 +12:00

Set the content to the cursor if a key is given

This commit is contained in:
phxntxm 2017-03-08 00:44:58 -06:00
parent 58eb623a1a
commit ca5bcbdc80

View file

@ -205,6 +205,8 @@ async def get_content(table, key=None):
content = await _convert_to_list(cursor)
if len(content) == 0:
content = None
else:
content = cursor
except (IndexError, r.ReqlOpFailedError):
content = None
await conn.close()