From 3cee4b243a6e156894602bd1b4fb37f792c5deb7 Mon Sep 17 00:00:00 2001 From: machka-pasla Date: Wed, 6 Aug 2025 20:19:45 +0300 Subject: [PATCH] Refactor details string handling in statistics display - Simplified the logic for displaying synchronization details by removing the character limit, ensuring full visibility of the details or defaulting to "N/A" when not available. - Improved code readability by streamlining the assignment of the details string. --- bot/handlers/admin/statistics.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bot/handlers/admin/statistics.py b/bot/handlers/admin/statistics.py index 4cdcc73..34561c3 100644 --- a/bot/handlers/admin/statistics.py +++ b/bot/handlers/admin/statistics.py @@ -197,9 +197,7 @@ async def show_statistics_handler(callback: types.CallbackQuery, '%Y-%m-%d %H:%M:%S UTC') if sync_time_val else "N/A" details_val = sync_status_model.details - details_str = (details_val[:100] + - "...") if details_val and len(details_val) > 100 else ( - details_val or "N/A") + details_str = details_val or "N/A" stats_text_parts.append( f" {_('admin_stats_sync_time')}: {sync_time_str}")