Commit 384ec249 by François C.

Merge branch 'mail_after_missing_shift' into 'dev_cooperatic'

Modify shift_registration state condition to match actual use

See merge request !13
parents 27ee1d6a 5754aa08
...@@ -25,7 +25,7 @@ class ShiftRegistration(models.Model): ...@@ -25,7 +25,7 @@ class ShiftRegistration(models.Model):
now = datetime.datetime.now() now = datetime.datetime.now()
yesterday = now - datetime.timedelta(hours=24) yesterday = now - datetime.timedelta(hours=24)
reg_targets = shift_env.search([ reg_targets = shift_env.search([
('state', 'in', ['open', 'excused']), ('state', 'in', ['excused']),
('date_begin', '>=', yesterday.strftime("%Y-%m-%d %H:%M:%S")), ('date_begin', '>=', yesterday.strftime("%Y-%m-%d %H:%M:%S")),
('date_begin', '<', now.strftime("%Y-%m-%d %H:%M:%S")) ('date_begin', '<', now.strftime("%Y-%m-%d %H:%M:%S"))
]) ])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment