Fix broken query remove_all_by_username
This commit is contained in:
parent
87a6b95e8c
commit
a249eb0572
1 changed files with 8 additions and 1 deletions
|
@ -666,7 +666,14 @@ module Access_list = struct
|
|||
let remove_all_by_username =
|
||||
Caqti_request.exec
|
||||
Caqti_type.string
|
||||
"DELETE FROM access_list, user WHERE access_list.user = user.id AND user.username = ?"
|
||||
{| DELETE FROM access_list
|
||||
WHERE access_list.id IN (
|
||||
SELECT access_list.id
|
||||
FROM access_list
|
||||
INNER JOIN user ON access_list.user = user.id
|
||||
WHERE user.username = ?
|
||||
)
|
||||
|}
|
||||
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue