updateSubmit :: Submit -> DatabaseT ()
updateSubmit s = do
  submit <- findSubmit [SubmitSubmitTime ==. submitSubmitTime s,
                        SubmitUserId ==. submitUserId s]
  case liftM entityKey submit of
    Nothing -> return ()
    Just submitId -> runSql $ replace submitId s
updateSubmit :: Submit -> DatabaseT ()
updateSubmit s = do
  submit <- findSubmit [SubmitSubmitTime ==. submitSubmitTime s,
                        SubmitUserId ==. submitUserId s]
  case liftM entityKey submit of
    Nothing -> return ()
    Just submitId -> runSql $ replace submitId s
updateSubmit s = do
  submit <- findSubmit [SubmitSubmitTime ==. submitSubmitTime s,
                        SubmitUserId ==. submitUserId s]
  case liftM entityKey submit of
    Nothing -> return ()
    Just submitId -> runSql $ replace submitId s