don't check connections in deleteUnusedProfile_

This commit is contained in:
spaced4ndy
2023-09-18 13:22:18 +04:00
parent d9ab7ec6d4
commit 2016a0efde

View File

@@ -275,10 +275,6 @@ deleteUnusedProfile_ db userId profileId =
[sql|
DELETE FROM contact_profiles
WHERE user_id = :user_id AND contact_profile_id = :profile_id
AND 1 NOT IN (
SELECT 1 FROM connections
WHERE user_id = :user_id AND custom_user_profile_id = :profile_id LIMIT 1
)
AND 1 NOT IN (
SELECT 1 FROM contacts
WHERE user_id = :user_id AND contact_profile_id = :profile_id LIMIT 1