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.
This commit is contained in:
@@ -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}")
|
||||
|
||||
Reference in New Issue
Block a user