Allow for empty banned tags list (#34)

This commit is contained in:
Chris Done 2014-11-20 14:28:53 +01:00
parent f36df17c01
commit 41a9160c19

View File

@ -19,9 +19,10 @@ getBannedTagsR = do
curr <- fmap (map (bannedTagTag . entityVal))
$ runDB $ selectList [] [Asc BannedTagTag]
((res, widget), enctype) <- runFormPost $ renderDivs
$ areq
$ fmap (fromMaybe [])
$ aopt
(checkMMap checkSlugs fromSlugs textareaField)
"Banned tags (one per line)" $ Just curr
"Banned tags (one per line)" $ Just (Just curr)
case res of
FormSuccess tags -> do
runDB $ do