From a744aac3324cb960b19859a4962472b96b6de005 Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Wed, 17 Oct 2018 20:32:41 +0200 Subject: [PATCH] bug fix --- rowers/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rowers/models.py b/rowers/models.py index cbc298ef..ffdb668e 100644 --- a/rowers/models.py +++ b/rowers/models.py @@ -1200,7 +1200,8 @@ def createmicrofillers(plan): plan = plan ).order_by("startdate") - if cycles[0].startdate > plan.startdate: + + if cycles and cycles[0].startdate > plan.startdate: macr = TrainingMicroCycle( plan=plan, startdate = plan.startdate,