From e24c272e2e7251ba334dad777d2fee865007f2e8 Mon Sep 17 00:00:00 2001 From: Inference Bot Date: Wed, 21 Oct 2026 21:16:59 -0600 Subject: [PATCH] org-link fix: INSERT bound 4 values to 3 placeholders (500 on every link); slug = org slug --- app/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index c141008..8f26769 100644 --- a/app/main.py +++ b/app/main.py @@ -2476,10 +2476,13 @@ async def admin_org_link(request: Request): conn = get_db() existing = conn.execute("SELECT email FROM members WHERE org_slug = ?", (org_slug,)).fetchone() + # slug = the org slug (this row represents the org's contact, not an OC + # individual — provision_member() overwrites slug/cloudron_user_id/key for + # emails that resolve to a real OC account). conn.execute( "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), + (email, org_slug, org_slug), ) conn.commit() conn.close()