From 3b66f780a924a28f4a2f282c95cabfbdac3b893c Mon Sep 17 00:00:00 2001 From: phxntxm Date: Wed, 31 Aug 2016 23:44:45 -0500 Subject: [PATCH] Added another check in case cached object failed --- cogs/utils/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cogs/utils/config.py b/cogs/utils/config.py index 133c089..caa2132 100644 --- a/cogs/utils/config.py +++ b/cogs/utils/config.py @@ -124,7 +124,7 @@ async def save_content(table: str, content): # Now that we've saved the new content, we should update our cache cached = cache.get(table) # 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) else: await cached.update()