fixed check of used avatars

This commit is contained in:
nek0 2015-06-24 01:48:06 +02:00
parent f1927d7452
commit c5f138a36c
1 changed files with 2 additions and 1 deletions

View File

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