[fix] company listing context

This commit is contained in:
Prateeksha Singh
2018-04-05 14:44:16 +05:30
parent d77e8e5b02
commit 420c79041e
10 changed files with 352 additions and 204 deletions

View File

@@ -135,7 +135,7 @@ def get_details(hub_sync_id=None, doctype='Hub Item'):
connection = get_client_connection()
details = connection.get_doc(doctype, hub_sync_id)
reviews = details.get('reviews')
if len(reviews):
if reviews and len(reviews):
for r in reviews:
r.setdefault('pretty_date', frappe.utils.pretty_date(r.get('modified')))
details.setdefault('reviews', reviews)

View File

@@ -10,12 +10,10 @@ from frappe import _
from erpnext.utilities.product import get_price, get_qty_in_stock
from six import string_types
# hub_url = "https://hubmarket.org"
hub_url = "http://159.89.175.122"
hub_url = "https://hubmarket.org"
# hub_url = "http://159.89.175.122"
# hub_url = "http://erpnext.hub:8000"
# test_hub_url = "https://hubmarket.org"
class OAuth2Session():
def __init__(self, headers):
self.headers = headers

View File