diff --git a/frappe/public/js/frappe/router_history.js b/frappe/public/js/frappe/router_history.js index ada071eb81..265d7d7e9b 100644 --- a/frappe/public/js/frappe/router_history.js +++ b/frappe/public/js/frappe/router_history.js @@ -7,8 +7,6 @@ const save_routes = frappe.utils.debounce(() => { frappe.xcall('frappe.deferred_insert.deferred_insert', { 'doctype': 'Route History', 'records': routes - }).then(() => { - console.log('Routes saved!'); }).catch(() => { frappe.route_history_queue.concat(routes); }); diff --git a/frappe/social/doctype/post/post.py b/frappe/social/doctype/post/post.py index db4d6995d6..578dfe680d 100644 --- a/frappe/social/doctype/post/post.py +++ b/frappe/social/doctype/post/post.py @@ -4,6 +4,8 @@ from __future__ import unicode_literals import frappe +import requests +from bs4 import BeautifulSoup from frappe.model.document import Document class Post(Document): @@ -41,11 +43,9 @@ def get_link_info(url): if cached_link_info: return cached_link_info - from bs4 import BeautifulSoup - import requests try: page = requests.get(url) - except (requests.exceptions.MissingSchema, requests.exceptions.ConnectionError) as e: + except requests.exceptions.MissingSchema, requests.exceptions.ConnectionError: frappe.cache().hset("link_info", url, {}) return {}