From 0cc80e81a0f15a86a645a9b48dc32e547fe42ec6 Mon Sep 17 00:00:00 2001 From: samerbam Date: Tue, 22 Aug 2023 22:39:46 -0400 Subject: [PATCH] check for quotes and which 'and' to 'or' --- application/database.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/database.py b/application/database.py index d83a653..813c550 100644 --- a/application/database.py +++ b/application/database.py @@ -52,7 +52,7 @@ class TodoDatabase: def get_random_quote(self): # print(time.time()) - if ("quotes_last_updated" in self.database) and (time.time()-self.database["quotes_last_updated"] > 86400): + if ("quotes_last_updated" in self.database) or ("quotes" in self.database) or (time.time()-self.database["quotes_last_updated"] > 86400): self._update_quotes() quote = random.choice(self.database["quotes"])