- Partner model additions
- menu changes to allow for partners - partner views and forms now in partner_forms.py and partner_views.py - Introduction of services layer - Allow all configuration to handle partner configurations, and adaptation of caching to allow for this
This commit is contained in:
@@ -56,13 +56,13 @@ def attribute_error_handler(error):
|
||||
# Handle the SQLAlchemy relationship error specifically
|
||||
if "'str' object has no attribute '_sa_instance_state'" in error_msg:
|
||||
flash('Database relationship error. Please check your form inputs and try again.', 'error')
|
||||
return render_template('errors/500.html',
|
||||
return render_template('error/500.html',
|
||||
error_type="Relationship Error",
|
||||
error_details="A string value was provided where a database object was expected."), 500
|
||||
|
||||
# Handle other AttributeErrors
|
||||
flash('An application error occurred. The technical team has been notified.', 'error')
|
||||
return render_template('errors/500.html',
|
||||
return render_template('error/500.html',
|
||||
error_type="Attribute Error",
|
||||
error_details=error_msg), 500
|
||||
|
||||
@@ -70,7 +70,7 @@ def attribute_error_handler(error):
|
||||
def general_exception(e):
|
||||
current_app.logger.error(f"Unhandled Exception: {e}", exc_info=True)
|
||||
flash('An application error occurred. The technical team has been notified.', 'error')
|
||||
return render_template('errors/500.html',
|
||||
return render_template('error/500.html',
|
||||
error_type=type(e).__name__,
|
||||
error_details=str(e)), 500
|
||||
|
||||
|
||||
Reference in New Issue
Block a user