defaults cleanup

This commit is contained in:
Rushabh Mehta 2013-02-19 15:54:15 +05:30
parent 5c6216f0bd
commit 2fe861fa71
2 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@ def get_companies():
# if match == company is specified and companies are specified in user defaults # if match == company is specified and companies are specified in user defaults
if match: if match:
return webnotes.defaults.get_user_defaults("company") return webnotes.defaults.get_user_default_as_list("company")
else: else:
return [r[0] for r in webnotes.conn.sql("""select name from tabCompany return [r[0] for r in webnotes.conn.sql("""select name from tabCompany
where docstatus!=2""")] where docstatus!=2""")]

View File

@ -9,7 +9,7 @@ erpnext.desktop.refresh = function() {
$("#icon-grid .case-wrapper").each(function(i, e) { $("#icon-grid .case-wrapper").each(function(i, e) {
new_order.push($(this).attr("data-name")); new_order.push($(this).attr("data-name"));
}); });
wn.user.set_default("_desktop_items", new_order); wn.defaults.set_default("_desktop_items", new_order);
} }
}); });
} }