04/28 Updated sprint 3
This commit is contained in:
+13
-10
@@ -541,7 +541,6 @@ def attendance_report():
|
||||
except Exception as e:
|
||||
logger_handler.logger.error(f"Error loading attendance report: {e}", exc_info=True)
|
||||
|
||||
import traceback
|
||||
error_traceback = traceback.format_exc()
|
||||
|
||||
|
||||
@@ -857,7 +856,7 @@ def save_manual_attendance():
|
||||
except Exception as e:
|
||||
db.session.rollback()
|
||||
logger_handler.logger.error(f"Error saving manual attendance record: {e}")
|
||||
logger_handler.logger.error(f"Traceback: {traceback.format_exc()}")
|
||||
logger_handler.logger.error(f"Error saving manual attendance record: {e}", exc_info=True)
|
||||
flash('Error saving attendance record. Please try again.', 'error')
|
||||
return redirect(url_for('attendance.add_manual_attendance'))
|
||||
|
||||
@@ -1358,12 +1357,14 @@ def get_verification_details(record_id):
|
||||
# Prepare record data with safe formatting
|
||||
try:
|
||||
check_in_date_str = record.check_in_date.strftime('%Y-%m-%d') if record.check_in_date else 'N/A'
|
||||
except:
|
||||
except Exception as e:
|
||||
logger_handler.logger.debug(f"check_in_date strftime failed: {e}")
|
||||
check_in_date_str = str(record.check_in_date) if record.check_in_date else 'N/A'
|
||||
|
||||
try:
|
||||
check_in_time_str = record.check_in_time.strftime('%I:%M %p') if record.check_in_time else 'N/A'
|
||||
except:
|
||||
except Exception as e:
|
||||
logger_handler.logger.debug(f"check_in_time strftime failed: {e}")
|
||||
check_in_time_str = str(record.check_in_time) if record.check_in_time else 'N/A'
|
||||
|
||||
record_data = {
|
||||
@@ -1439,12 +1440,14 @@ def verification_review_detail(record_id):
|
||||
# Format date and time for display
|
||||
try:
|
||||
check_in_date = record.check_in_date.strftime('%m/%d/%Y') if record.check_in_date else 'N/A'
|
||||
except:
|
||||
except Exception as e:
|
||||
logger_handler.logger.debug(f"check_in_date strftime failed: {e}")
|
||||
check_in_date = str(record.check_in_date) if record.check_in_date else 'N/A'
|
||||
|
||||
try:
|
||||
check_in_time = record.check_in_time.strftime('%I:%M %p') if record.check_in_time else 'N/A'
|
||||
except:
|
||||
except Exception as e:
|
||||
logger_handler.logger.debug(f"check_in_time strftime failed: {e}")
|
||||
check_in_time = str(record.check_in_time) if record.check_in_time else 'N/A'
|
||||
|
||||
return render_template('verification_review_detail.html',
|
||||
@@ -2012,8 +2015,8 @@ def create_excel_export(selected_columns, column_names, filters):
|
||||
|
||||
if len(cell_value) > max_length:
|
||||
max_length = len(cell_value)
|
||||
except:
|
||||
pass
|
||||
except Exception:
|
||||
pass # Non-string cell value — skip width measurement
|
||||
|
||||
# Set width based on column type with reasonable limits
|
||||
# Define optimal widths for specific column types
|
||||
@@ -2353,8 +2356,8 @@ def create_excel_export_ordered(selected_columns, column_names, filters):
|
||||
|
||||
if len(cell_value) > max_length:
|
||||
max_length = len(cell_value)
|
||||
except:
|
||||
pass
|
||||
except Exception:
|
||||
pass # Non-string cell value — skip width measurement
|
||||
|
||||
# Set width based on column type with reasonable limits
|
||||
# Define optimal widths for specific column types
|
||||
|
||||
Reference in New Issue
Block a user