summaryrefslogtreecommitdiff
path: root/Handler/Vacation.hs
diff options
context:
space:
mode:
authorClint Adams <clint@softwarefreedom.org>2015-02-05 18:56:02 -0500
committerClint Adams <clint@softwarefreedom.org>2015-02-05 18:56:02 -0500
commitb7bdac567ffe809b36e16fe29a663c1f437b38ae (patch)
tree7643a1df6ed1daaf35557ebe36b12ad79b2090ed /Handler/Vacation.hs
parentb442c48cbaa1a1cfae4e42aa03bc41e33f2710f9 (diff)
Handle multiple stints of employment
Diffstat (limited to 'Handler/Vacation.hs')
-rw-r--r--Handler/Vacation.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Handler/Vacation.hs b/Handler/Vacation.hs
index 18a96cb..e6c95f9 100644
--- a/Handler/Vacation.hs
+++ b/Handler/Vacation.hs
@@ -14,7 +14,7 @@ getVacationR cid = do
user <- runDB $ get404 cid
ma <- maybeAuth
today <- fmap utctDay (liftIO getCurrentTime)
- [e'] <- runDB $ fmap (map entityVal) (selectList [EmploymentUser ==. cid] [])
+ (e':es) <- runDB $ fmap (map entityVal) (selectList [EmploymentUser ==. cid] [])
let twoyear = twoYearsFrom $ employmentStartDate e'
username = userIdent user
(currentyear, currentmonth) = monthOf today