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()