From f97a6f632220aedb3c5f458ae94d98c945546963 Mon Sep 17 00:00:00 2001 From: Brad Stein Date: Sun, 18 Jan 2026 00:38:39 -0300 Subject: [PATCH] fix: repair firefly reset handler --- backend/atlas_portal/routes/account.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/backend/atlas_portal/routes/account.py b/backend/atlas_portal/routes/account.py index dc6bf82..bb2d084 100644 --- a/backend/atlas_portal/routes/account.py +++ b/backend/atlas_portal/routes/account.py @@ -442,29 +442,29 @@ def register(app) -> None: except Exception: pass - email = mailu_email or keycloak_email or f\"{username}@{settings.MAILU_DOMAIN}\" + email = mailu_email or keycloak_email or f"{username}@{settings.MAILU_DOMAIN}" password = random_password(24) try: result = trigger_firefly_user_sync(username, email, password, wait=True) - status_val = result.get(\"status\") if isinstance(result, dict) else \"error\" - if status_val != \"ok\": - raise RuntimeError(f\"firefly sync {status_val}\") + status_val = result.get("status") if isinstance(result, dict) else "error" + if status_val != "ok": + raise RuntimeError(f"firefly sync {status_val}") except Exception as exc: - message = str(exc).strip() or \"firefly sync failed\" - return jsonify({\"error\": message}), 502 + message = str(exc).strip() or "firefly sync failed" + return jsonify({"error": message}), 502 try: - admin_client().set_user_attribute(username, \"firefly_password\", password) + admin_client().set_user_attribute(username, "firefly_password", password) admin_client().set_user_attribute( username, - \"firefly_password_updated_at\", - time.strftime(\"%Y-%m-%dT%H:%M:%SZ\", time.gmtime()), + "firefly_password_updated_at", + time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime()), ) except Exception: - return jsonify({\"error\": \"failed to store firefly password\"}), 502 + return jsonify({"error": "failed to store firefly password"}), 502 - return jsonify({\"status\": \"ok\", \"password\": password}) + return jsonify({"status": "ok", "password": password}) @app.route("/api/account/nextcloud/mail/sync", methods=["POST"]) @require_auth