correct badge title revocation query

This commit is contained in:
Sam 2014-10-09 22:00:27 +11:00
parent 2d99d9b6cb
commit be48dfbb8c

View file

@ -315,7 +315,8 @@ class BadgeGranter
title NOT IN (
SELECT name
FROM badges
WHERE allow_title AND enabled
WHERE allow_title AND enabled AND
badges.id IN (SELECT badge_id FROM user_badges ub where ub.user_id = users.id)
)
")
end