Error creating primary contact from new customer form

Whenever i try to create a new primary contact from new customer form. I get the following error. Also i am not able to report the same from with in

App Versions
{
“erpnext”: “10.0.6”,
“frappe”: “10.0.7”
}
Route
Form/Contact/KT Naidu
Error Report
Traceback (most recent call last):
File “/Users/sampathreddyvanteru/frappe-bench/apps/frappe/frappe/app.py”, line 62, in application
response = frappe.handler.handle()
File “/Users/sampathreddyvanteru/frappe-bench/apps/frappe/frappe/handler.py”, line 22, in handle
data = execute_cmd(cmd)
File “/Users/sampathreddyvanteru/frappe-bench/apps/frappe/frappe/handler.py”, line 53, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/Users/sampathreddyvanteru/frappe-bench/apps/frappe/frappe/init.py”, line 939, in call
return fn(*args, **newargs)
File “/Users/sampathreddyvanteru/frappe-bench/apps/frappe/frappe/desk/search.py”, line 14, in search_link
search_widget(doctype, txt, query, searchfield=searchfield, page_length=page_length, filters=filters)
File “/Users/sampathreddyvanteru/frappe-bench/apps/frappe/frappe/desk/search.py”, line 35, in search_widget
searchfield, start, page_length, filters, as_dict=as_dict)
File “/Users/sampathreddyvanteru/frappe-bench/apps/frappe/frappe/init.py”, line 939, in call
return fn(*args, **newargs)
File “/Users/sampathreddyvanteru/frappe-bench/apps/frappe/frappe/contacts/address_and_contact.py”, line 163, in filter_dynamic_link_doctypes
return sorted(valid_doctypes, key=lambda item: item[0])
File “/Users/sampathreddyvanteru/frappe-bench/apps/frappe/frappe/contacts/address_and_contact.py”, line 163, in
return sorted(valid_doctypes, key=lambda item: item[0])
IndexError: tuple index out of range
Request Data
{
“type”: “GET”,
“args”: {
“txt”: “”,
“doctype”: “DocType”,
“query”: “frappe.contacts.address_and_contact.filter_dynamic_link_doctypes”,
“filters”: “{“fieldtype”:“HTML”,“fieldname”:“contact_html”}”,
“cmd”: “frappe.desk.search.search_link”
},
“url”: “/”
}