fix: template defects
This commit is contained in:
@@ -45,7 +45,7 @@ def update_markdown_setting(setting_id):
|
||||
setting.template_setting_id = template_setting_id
|
||||
session.commit()
|
||||
return jsonify(setting.to_dict()), 200
|
||||
except Exception:
|
||||
except Exception as e:
|
||||
return jsonify({"error": "failed to update setting"}), 500
|
||||
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ def create_template_setting():
|
||||
new_setting = MarkdownTemplateSetting(template_id=template_id)
|
||||
with get_db() as session:
|
||||
session.add(new_setting)
|
||||
session.commit()
|
||||
return jsonify(new_setting.to_dict()), 201
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user