fix butch audit cache

This commit is contained in:
Vladless
2026-03-20 18:42:22 +03:00
parent 3b67715ac0
commit c1b9b20ea3
+3
View File
@@ -1095,6 +1095,9 @@ async def drain_audit_redis_to_db(session_factory: Any) -> int:
created = datetime.now(timezone.utc)
elif created is None:
created = datetime.now(timezone.utc)
elif not isinstance(created, datetime):
created = datetime.now(timezone.utc)
created = _naive_utc(created)
event = AuditEvent(
event_type=rec.get("event_type", "telegram_access"),
channel=rec.get("channel", "telegram"),