Move import inside function
This commit is contained in:
parent
5c9e9d3311
commit
28d592e182
1 changed files with 2 additions and 2 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue