Set the content to the cursor if a key is given
This commit is contained in:
parent
58eb623a1a
commit
ca5bcbdc80
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue