From 28d52dfe0cc4df39e9820b856205e5bd3486daed Mon Sep 17 00:00:00 2001 From: Prateeksha Singh Date: Tue, 7 Aug 2018 12:56:56 +0530 Subject: [PATCH] [hub][fix] Category page api call --- erpnext/public/js/hub/pages/category.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/erpnext/public/js/hub/pages/category.js b/erpnext/public/js/hub/pages/category.js index 87311abe72..13a0a92f8c 100644 --- a/erpnext/public/js/hub/pages/category.js +++ b/erpnext/public/js/hub/pages/category.js @@ -5,15 +5,14 @@ erpnext.hub.Category = class Category extends SubPage { refresh() { this.category = frappe.get_route()[2]; this.get_items_for_category(this.category) - .then(r => { - this.render(r.message); + .then(items => { + this.render(items); }); } get_items_for_category(category) { this.$wrapper.find('.hub-card-container').empty(); - return frappe.call('erpnext.hub_node.api.get_list', { - doctype: 'Hub Item', + return hub.call('get_items', { filters: { hub_category: category }