diff --git a/modules/restserver/src/main/scala/docspell/restserver/routes/NotifyDueItemsRoutes.scala b/modules/restserver/src/main/scala/docspell/restserver/routes/NotifyDueItemsRoutes.scala index 76ac9e20..e2496a7d 100644 --- a/modules/restserver/src/main/scala/docspell/restserver/routes/NotifyDueItemsRoutes.scala +++ b/modules/restserver/src/main/scala/docspell/restserver/routes/NotifyDueItemsRoutes.scala @@ -79,7 +79,7 @@ object NotifyDueItemsRoutes { } yield NotificationSettings( task.id, task.enabled, - conn.getOrElse(Ident.unsafe("none")), + conn.getOrElse(Ident.unsafe("")), task.args.recipients, task.timer, task.args.remindDays, diff --git a/modules/webapp/src/main/elm/Comp/NotificationForm.elm b/modules/webapp/src/main/elm/Comp/NotificationForm.elm index 58d3e5bd..a9e1cfcd 100644 --- a/modules/webapp/src/main/elm/Comp/NotificationForm.elm +++ b/modules/webapp/src/main/elm/Comp/NotificationForm.elm @@ -24,6 +24,7 @@ import Html.Attributes exposing (..) import Html.Events exposing (onCheck, onClick) import Http import Util.Http +import Util.Maybe import Util.Tag import Util.Update @@ -271,9 +272,14 @@ update flags msg model = SetNotificationSettings (Ok s) -> let + smtp = + Util.Maybe.fromString s.smtpConnection + |> Maybe.map List.singleton + |> Maybe.withDefault [] + ( nm, nc ) = Util.Update.andThen1 - [ update flags (ConnMsg (Comp.Dropdown.SetSelection [ s.smtpConnection ])) + [ update flags (ConnMsg (Comp.Dropdown.SetSelection smtp)) , update flags (TagIncMsg (Comp.Dropdown.SetSelection s.tagsInclude)) , update flags (TagExcMsg (Comp.Dropdown.SetSelection s.tagsExclude)) ]