Added another check in case cached object failed
This commit is contained in:
parent
34bc196c21
commit
3b66f780a9
1 changed files with 1 additions and 1 deletions
|
@ -124,7 +124,7 @@ async def save_content(table: str, content):
|
||||||
# Now that we've saved the new content, we should update our cache
|
# Now that we've saved the new content, we should update our cache
|
||||||
cached = cache.get(table)
|
cached = cache.get(table)
|
||||||
# While this should theoretically never happen, we just want to make sure
|
# While this should theoretically never happen, we just want to make sure
|
||||||
if cached is None or len(cached.values) == 0:
|
if cached is None or isinstance(cached, {}) or len(cached.values) == 0:
|
||||||
cache[table] = Cache(table)
|
cache[table] = Cache(table)
|
||||||
else:
|
else:
|
||||||
await cached.update()
|
await cached.update()
|
||||||
|
|
Loading…
Reference in a new issue