From dba2c5ce6d132134fb43d41a8e071c1b7ec3c753 Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 18 Jan 2021 20:51:33 +0000 Subject: [PATCH] fix targets --- shifts.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shifts.py b/shifts.py index e84e93b..0608c51 100644 --- a/shifts.py +++ b/shifts.py @@ -651,9 +651,9 @@ class RotaBuilder(object): worker.fte_adj) if self.use_previous_shifts: - if shift in worker.previous_shifts: - worked, allocated = worker.previous_shifts[shift] - target_shifts = target_shifts + allocated - worked + if shift.name in worker.previous_shifts: + worked, allocated = worker.previous_shifts[shift.name] + target_shifts = target_shifts + float(allocated) - float(worked) worker.shift_target_number[shift.name] = target_shifts