Move import inside function

This commit is contained in:
Rohan Bansal 2018-09-10 11:03:19 +05:30
parent 5c9e9d3311
commit 28d592e182

View file

@ -4,8 +4,6 @@
from __future__ import unicode_literals
import googlemaps
import frappe
from frappe import _
from frappe.model.document import Document
@ -23,6 +21,8 @@ class GoogleMapsSettings(Document):
if not self.enabled:
frappe.throw(_("Google Maps integration is not enabled"))
import googlemaps
try:
client = googlemaps.Client(key=self.client_key)
except Exception as e: