Fix heatmap button args

This commit is contained in:
2026-02-15 00:51:09 +03:00
parent b138ee316d
commit 568cd86844

View File

@@ -13,8 +13,7 @@ from keyboards import (
system_logs_integrations_kb, system_logs_integrations_kb,
system_logs_kb, system_logs_kb,
openwrt_kb, openwrt_kb,
docker_kb, docker_kb, backup_kb,
backup_kb,
) )
from system_checks import security, disks, hardware, list_disks, smart_last_test from system_checks import security, disks, hardware, list_disks, smart_last_test
from services.http_checks import get_url_checks, check_url from services.http_checks import get_url_checks, check_url
@@ -490,9 +489,10 @@ async def incidents_diff(msg: Message):
async def alerts_heatmap(msg: Message): async def alerts_heatmap(msg: Message):
if not is_admin_msg(msg): if not is_admin_msg(msg):
return return
parts = msg.text.split()
hours = 48 hours = 48
category = None category = None
if msg.text.startswith("/alerts_heatmap"):
parts = msg.text.split()
for part in parts[1:]: for part in parts[1:]:
if part.isdigit(): if part.isdigit():
hours = max(1, int(part)) hours = max(1, int(part))