def get_things_todo(as_list=False):
 data = frappe.get_list(u'ToDo', fields=([u'name', u'description'] if as_list else u'count(*)'), filters=[[u'ToDo', u'status', u'=', u'Open']], or_filters=[[u'ToDo', u'owner', u'=', frappe.session.user], [u'ToDo', u'assigned_by', u'=', frappe.session.user]], as_list=True)
 if as_list:
  return data
 else:
  return data[0][0]

def get_things_todo ( as_list = False ) : data = frappe . get_list ( u'ToDo' , fields = ( [ u'name' , u'description' ] if as_list else u'count(*)' ) , filters = [ [ u'ToDo' , u'status' , u'=' , u'Open' ] ] , or_filters = [ [ u'ToDo' , u'owner' , u'=' , frappe . session . user ] , [ u'ToDo' , u'assigned_by' , u'=' , frappe . session . user ] ] , as_list = True ) if as_list : return data else : return data [ 0 ] [ 0 ]
returns a count of incomplete todos .