This commit is contained in:
parent
0ff83c60f4
commit
8ed276c1b8
@ -30,7 +30,9 @@ class Redis:
|
|||||||
async def get(self, key, loads=True):
|
async def get(self, key, loads=True):
|
||||||
"""Get a specific key."""
|
"""Get a specific key."""
|
||||||
if loads:
|
if loads:
|
||||||
return json.loads(await self._redis.get(key))
|
value = await self._redis.get(key)
|
||||||
|
if value:
|
||||||
|
return json.loads(value)
|
||||||
return await self._redis.get(key)
|
return await self._redis.get(key)
|
||||||
|
|
||||||
async def close(self):
|
async def close(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user