From cdabbcbe8da13b3da21bae93441e47912261c6e7 Mon Sep 17 00:00:00 2001 From: Ali Maktabi Date: Thu, 17 Oct 2024 15:33:35 +0330 Subject: [PATCH] refactored code --- telegram/views.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/telegram/views.py b/telegram/views.py index d7650b9..de6fbd6 100644 --- a/telegram/views.py +++ b/telegram/views.py @@ -20,9 +20,7 @@ def get_telegram_safe_ips(): - telegram_ips_cache = cache.get("telegram_safe_ip_list") - - if telegram_ips_cache: + if telegram_ips_cache := cache.get("telegram_safe_ip_list"): return telegram_ips_cache telegram_ips = requests.get("https://core.telegram.org/bots/webhooks").json()[