We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parentabf14d9 commit20d1cb3Copy full SHA for 20d1cb3
coderd/database/queries/workspaces.sql
@@ -109,15 +109,15 @@ WHERE
109
-- Filter by owner_name
110
AND CASE
111
WHEN @owner_username ::text!='' THEN
112
-owner_id= (SELECT idFROM usersWHERElower(username)=lower(@owner_username))
+owner_id= (SELECT idFROM usersWHERElower(username)=lower(@owner_username)AND deleted= false)
113
ELSE true
114
END
115
-- Filter by template_name
116
-- There can be more than 1 template with the same name across organizations.
117
-- Use the organization filter to restrict to 1 org if needed.
118
119
WHEN @template_name ::text!='' THEN
120
-template_id= ANY(SELECT idFROM templatesWHERElower(name)=lower(@template_name))
+template_id= ANY(SELECT idFROM templatesWHERElower(name)=lower(@template_name)AND deleted= false)
121
122
123
-- Filter by template_ids