diff --git a/config/models b/config/models index 349a292..cd56a5d 100644 --- a/config/models +++ b/config/models @@ -17,8 +17,9 @@ ------------------------------------------------------------------------------- Sharer - ident ShrIdent - name Text Maybe + ident ShrIdent + name Text Maybe + created UTCTime default='now()' UniqueSharer ident diff --git a/src/Vervis/Handler/Person.hs b/src/Vervis/Handler/Person.hs index bc1de78..56e30b8 100644 --- a/src/Vervis/Handler/Person.hs +++ b/src/Vervis/Handler/Person.hs @@ -50,10 +50,12 @@ postPeopleR = do ((result, widget), enctype) <- runFormPost formPersonNew case result of FormSuccess pn -> do + now <- liftIO getCurrentTime runDB $ do let sharer = Sharer - { sharerIdent = text2shr $ uLogin pn - , sharerName = uName pn + { sharerIdent = text2shr $ uLogin pn + , sharerName = uName pn + , sharerCreated = now } sid <- insert sharer let person = Person