fixed check of used avatars

This commit is contained in:
nek0 2015-06-24 01:48:06 +02:00
parent f1927d7452
commit c5f138a36c

View file

@ -119,7 +119,8 @@ getAvatarDeleteR aId = do
case ma of case ma of
Just _ -> do Just _ -> do
c <- runDB $ selectList [UserAvatar ==. Just aId] [] c <- runDB $ selectList [UserAvatar ==. Just aId] []
case null c of d <- runDB $ selectList [BeverageAvatar ==. Just aId] []
case null c && null d of
True -> do True -> do
runDB $ delete aId runDB $ delete aId
setMessageI MsgAvatarDeleted setMessageI MsgAvatarDeleted