mirror of
https://github.com/coder/coder.git
synced 2026-06-03 04:58:23 +00:00
fix: filter out deleted users when attempting to delete an organization (#17621)
Closes [coder/internal#601](https://github.com/coder/internal/issues/601)
This commit is contained in:
Generated
+6
-1
@@ -482,9 +482,14 @@ BEGIN
|
||||
);
|
||||
|
||||
member_count := (
|
||||
SELECT count(*) as count FROM organization_members
|
||||
SELECT
|
||||
count(*) AS count
|
||||
FROM
|
||||
organization_members
|
||||
LEFT JOIN users ON users.id = organization_members.user_id
|
||||
WHERE
|
||||
organization_members.organization_id = OLD.id
|
||||
AND users.deleted = FALSE
|
||||
);
|
||||
|
||||
provisioner_keys_count := (
|
||||
|
||||
Reference in New Issue
Block a user