04/28 Updated sprint 3
This commit is contained in:
@@ -1320,8 +1320,8 @@ def export_time_attendance_excel(records, project_name_for_filename, date_range_
|
||||
try:
|
||||
if cell.value and len(str(cell.value)) > max_length:
|
||||
max_length = len(str(cell.value))
|
||||
except:
|
||||
pass
|
||||
except Exception:
|
||||
pass # Non-string cell value — skip width measurement
|
||||
|
||||
adjusted_width = min(max_length + 2, 50)
|
||||
ws.column_dimensions[column_letter].width = adjusted_width
|
||||
@@ -1453,8 +1453,8 @@ def export_time_attendance_by_building_excel(records, project_name_for_filename,
|
||||
qr_code = QRCode.query.filter_by(location=location_name).first()
|
||||
if qr_code:
|
||||
zone_info = getattr(qr_code, 'zone', '') or ''
|
||||
except:
|
||||
pass
|
||||
except Exception as e:
|
||||
logger_handler.logger.debug(f"Could not retrieve zone info for location '{location_name}': {e}")
|
||||
|
||||
# Building header row
|
||||
building_header = f"{location_index}) {location_name} - Zone {zone_info}"
|
||||
@@ -1990,8 +1990,8 @@ def export_time_attendance_by_building_excel(records, project_name_for_filename,
|
||||
try:
|
||||
if cell.value and len(str(cell.value)) > max_length:
|
||||
max_length = len(str(cell.value))
|
||||
except:
|
||||
pass
|
||||
except Exception:
|
||||
pass # Non-string cell value — skip width measurement
|
||||
|
||||
adjusted_width = min(max_length + 2, 50)
|
||||
ws.column_dimensions[column_letter].width = adjusted_width
|
||||
|
||||
Reference in New Issue
Block a user