Skip to content

Commit

Permalink
refactored code
Browse files Browse the repository at this point in the history
  • Loading branch information
alimaktabi committed Oct 17, 2024
1 parent eecab6c commit cdabbcb
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions telegram/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()[
Expand Down

0 comments on commit cdabbcb

Please sign in to comment.