From dec9a165ac2c31c51a4bacd4eb763e4790e502c1 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Mon, 10 Jun 2013 15:26:54 +0530 Subject: [PATCH] [patch] [fix] events for project, lead, oppty --- patches/june_2013/p04_fix_event_for_lead_oppty_project.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/patches/june_2013/p04_fix_event_for_lead_oppty_project.py b/patches/june_2013/p04_fix_event_for_lead_oppty_project.py index a6449c528a..6929eedcdd 100644 --- a/patches/june_2013/p04_fix_event_for_lead_oppty_project.py +++ b/patches/june_2013/p04_fix_event_for_lead_oppty_project.py @@ -9,12 +9,7 @@ def execute(): for ref_name in webnotes.conn.sql_list("""select ref_name from `tabEvent` where ref_type=%s and ifnull(starts_on, '')='' """, dt): if webnotes.conn.exists(dt, ref_name): - controller = webnotes.get_obj(dt, ref_name) - if dt == "Project": - controller.add_calendar_event() - else: - controller.delete_events() - controller._add_calendar_event() + webnotes.get_obj(dt, ref_name).add_calendar_event() else: # remove events where ref doc doesn't exist webnotes.delete_doc("Event", webnotes.conn.sql_list("""select name from `tabEvent`