From ac546fdc56bdee0090b881a049be1e38edf5324d Mon Sep 17 00:00:00 2001 From: Amy Gale Ruth Bowersox Date: Sat, 14 Mar 2026 22:31:33 -0600 Subject: [PATCH] Delete Community needs to clear its contact info record, too --- database/community.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/database/community.go b/database/community.go index 7c30863..de064be 100644 --- a/database/community.go +++ b/database/community.go @@ -611,7 +611,10 @@ func (c *Community) Delete(ctx context.Context, u *User, ipaddr string, backgrou if err == nil { _, err = tx.ExecContext(ctx, "DELETE FROM propcomm WHERE cid = ?", c.Id) if err == nil { - _, err = tx.ExecContext(ctx, "DELETE FROM communities WHERE commid = ?", c.Id) + _, err = tx.ExecContext(ctx, "DELETE FROM contacts WHERE owner_commid = ?", c.Id) + if err == nil { + _, err = tx.ExecContext(ctx, "DELETE FROM communities WHERE commid = ?", c.Id) + } } } }