From 58161506fff09c2ce5fb19af81fbb897a04b805e Mon Sep 17 00:00:00 2001 From: Ruk6787 Date: Wed, 20 May 2026 18:17:06 +0500 Subject: [PATCH] Added the check if data is none from uswgi.get_cache --- app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index 279f5fc..23ec526 100644 --- a/app.py +++ b/app.py @@ -29,7 +29,8 @@ def get(self) -> list[dict]: data: list[dict] = [] if HAS_UWSGI: data = uwsgi.cache_get("received_mail", "light_mail") - data = json.loads(data) + if data is not None: + data = json.loads(data) return data def set(self, data) -> None: