Fixed deleting user with no tokens bug
commit4a67a77a9680038e160843240797021a3aa78667
authoriko <ilyakooo0@gmail.com>
dateMon 13 May 2019, 12:57 (7 years ago)
parent70b987a
denis/src/Data/Query.hs+2−1
@@ -781,7 +781,8 @@ pruneDeadTokensQ = deleteFrom_ #tokens
781781
782782pruneGhostUsersQ :: Manipulation Schema '[] '[]
783783pruneGhostUsersQ = deleteFrom_ #users
784− (not_ . in_ #userRowId $ select (#tokens ! #tokenUserId `as` #id) $ from $ table #tokens)
784+ ((not_ . in_ #userRowId $ select (#tokens ! #tokenUserId `as` #id) (from $ table #tokens)) .&&
785+ (not_ . notNull $ #userRowIsValidated))
785786
786787-- MARK: FrontEnd Data Structures
787788