From 66f42121a5680b9b29c9f2b1e7d2b7b7f6579a5c Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 14 Nov 2014 15:59:24 +0530 Subject: [PATCH] hotfix in event --- frappe/core/doctype/event/event.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frappe/core/doctype/event/event.py b/frappe/core/doctype/event/event.py index a9511a9f2f..a834a06a01 100644 --- a/frappe/core/doctype/event/event.py +++ b/frappe/core/doctype/event/event.py @@ -108,7 +108,9 @@ def get_events(start, end, user=None, for_reminder=False): def add_event(e, date): new_event = e.copy() - enddate = add_days(date,int(date_diff(e.ends_on.split(" ")[0], e.starts_on.split(" ")[0]))) + + enddate = add_days(date,int(date_diff(e.ends_on.split(" ")[0], e.starts_on.split(" ")[0]))) \ + if (e.starts_on and e.ends_on) else date new_event.starts_on = date + " " + e.starts_on.split(" ")[1] if e.ends_on: new_event.ends_on = enddate + " " + e.ends_on.split(" ")[1]