Fix incidents_export file delivery
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import asyncio
|
||||
import os
|
||||
from aiogram import F
|
||||
from aiogram.types import Message, CallbackQuery, InlineKeyboardMarkup, InlineKeyboardButton
|
||||
from aiogram.types import Message, CallbackQuery, InlineKeyboardMarkup, InlineKeyboardButton, InputFile
|
||||
from app import dp, cfg
|
||||
from auth import is_admin_msg
|
||||
from keyboards import (
|
||||
@@ -440,7 +440,7 @@ async def incidents_export(msg: Message):
|
||||
bio.name = f"incidents_{hours}h.csv"
|
||||
summary = f"📤 Incidents export ({hours}h): {len(data)} rows, format {fmt}"
|
||||
await msg.answer(summary)
|
||||
await msg.answer_document(document=bio)
|
||||
await msg.answer_document(document=InputFile(bio, filename=bio.name))
|
||||
|
||||
|
||||
@dp.message(F.text == "🔒 SSL")
|
||||
|
||||
Reference in New Issue
Block a user