diff --git a/app/routes/__pycache__/admin.cpython-314.pyc b/app/routes/__pycache__/admin.cpython-314.pyc new file mode 100644 index 0000000..1347eac Binary files /dev/null and b/app/routes/__pycache__/admin.cpython-314.pyc differ diff --git a/app/routes/admin.py b/app/routes/admin.py index 1324ec6..7bca8f0 100644 --- a/app/routes/admin.py +++ b/app/routes/admin.py @@ -210,8 +210,11 @@ def admin_create_theme(): } with open(path, 'w', encoding='utf-8') as f: json.dump(template, f, ensure_ascii=False, indent=2) - logger.info(f"Neues Theme angelegt: {os.path.relpath(path, base_dir)}") - return jsonify({"success": True, "path": os.path.relpath(path, base_dir)}) + logger.info(f"Neues Theme angelegt: {os.path.relpath(path, base_dir)}") + return jsonify({"success": True, "path": os.path.relpath(path, base_dir)}) + except Exception as e: + logger.exception("create_theme fehlgeschlagen") + return jsonify({"success": False, "message": str(e)}), 500 @admin_bp.route('/set_default_theme', methods=['POST']) @@ -227,6 +230,3 @@ def admin_set_default_theme(): except Exception as e: logger.exception("Default-Theme setzen fehlgeschlagen") return jsonify({"success": False, "message": str(e)}), 500 - except Exception as e: - logger.exception("create_theme fehlgeschlagen") - return jsonify({"success": False, "message": str(e)}), 500