frappe/frappe#478, fixed list passed in

This commit is contained in:
Rushabh Mehta
2014-04-04 12:16:26 +05:30
parent 558a9aabfb
commit a504f0638b
14 changed files with 61 additions and 65 deletions

View File

@@ -31,9 +31,9 @@ def boot_session(bootinfo):
from `tabCompany`""", as_dict=1, update={"doctype":":Company"})
def load_country_and_currency(bootinfo):
if bootinfo.control_panel.country and \
frappe.db.exists("Country", bootinfo.control_panel.country):
bootinfo["docs"] += [frappe.get_doc("Country", bootinfo.control_panel.country)]
country = frappe.db.get_default("country")
if country and frappe.db.exists("Country", country):
bootinfo["docs"] += [frappe.get_doc("Country", country)]
bootinfo["docs"] += frappe.db.sql("""select * from tabCurrency
where ifnull(enabled,0)=1""", as_dict=1, update={"doctype":":Currency"})