From 394cccfbcb7e5bc688008822ed592ff30275f887 Mon Sep 17 00:00:00 2001 From: Inference Bot Date: Tue, 20 Oct 2026 22:55:55 -0600 Subject: [PATCH] =?UTF-8?q?org=20links:=20members=20table=20has=20no=20nam?= =?UTF-8?q?e=20column=20=E2=80=94=20drop=20it=20from=20org=20SQL/unpacking?= =?UTF-8?q?s=20(names=20come=20from=20OC/Cloudron)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/main.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/main.py b/app/main.py index ac9a523..2a4d10b 100644 --- a/app/main.py +++ b/app/main.py @@ -1996,11 +1996,11 @@ async def opencollective_webhook(request: Request, token: str): # dues; unlinked orgs ping the operator to link them. conn = get_db() row = conn.execute( - "SELECT email, name FROM members WHERE org_slug = ?", (slug,) + "SELECT email, org_slug FROM members WHERE org_slug = ?", (slug,) ).fetchone() conn.close() if row: - org_email, org_name = row + org_email, org_slug_col = row conn = get_db() conn.execute("UPDATE members SET active = 1 WHERE email = ?", (org_email,)) conn.commit() @@ -2373,7 +2373,7 @@ async def admin_org_link(request: Request): conn = get_db() existing = conn.execute("SELECT email FROM members WHERE org_slug = ?", (org_slug,)).fetchone() conn.execute( - "INSERT INTO members (email, name, slug, active, org_slug) VALUES (?, ?, ?, 1, ?) " + "INSERT INTO members (email, slug, active, org_slug) VALUES (?, ?, 1, ?) " "ON CONFLICT(email) DO UPDATE SET org_slug = excluded.org_slug, active = 1", (email, name, org_slug, org_slug), ) @@ -3152,17 +3152,17 @@ async def reconcile_memberships() -> dict: if org_backers or not org_fetch_ok: conn = get_db() org_rows = conn.execute( - "SELECT email, name, org_slug FROM members WHERE org_slug IS NOT NULL" + "SELECT email, org_slug FROM members WHERE org_slug IS NOT NULL" ).fetchall() conn.close() - for org_email, org_name, org_slug in org_rows: + for org_email, org_slug in org_rows: org = org_backers.get(org_slug) if org_fetch_ok and not org: continue # org lapsed → falls through to deactivation below if org_email not in active_emails: active.append({ "email": org_email, - "name": org_name or (org["name"] if org else org_slug), + "name": (org or {}).get("name") or org_slug, "slug": org_slug, "role": (org or {}).get("role", "BACKER"), "tier": ((org or {}).get("tier", "") or "") + " (org)",