Merge branch 'master' of github.com:webnotes/erpnext into responsive

Conflicts:
	projects/doctype/project/project.py
	utilities/transaction_base.py
This commit is contained in:
Anand Doshi
2013-06-17 12:55:05 +05:30
4 changed files with 12 additions and 17 deletions

View File

@@ -1,6 +1,8 @@
import webnotes
def execute():
from utilities.transaction_base import delete_events
# delete orphaned Event User
webnotes.conn.sql("""delete from `tabEvent User`
where not exists(select name from `tabEvent` where `tabEvent`.name = `tabEvent User`.parent)""")
@@ -15,5 +17,4 @@ def execute():
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`
where ref_type=%s and ref_name=%s""", (dt, ref_name)))
delete_events(dt, ref_name)