perf: defer GoogleOAuth import
This commit is contained in:
parent
71b44efcac
commit
8a83226c60
1 changed files with 2 additions and 1 deletions
|
|
@ -5,7 +5,6 @@ from urllib.parse import quote
|
|||
|
||||
import frappe
|
||||
from frappe import _
|
||||
from frappe.integrations.google_oauth import GoogleOAuth
|
||||
from frappe.model.document import Document
|
||||
from frappe.utils import encode, get_request_site_address
|
||||
from frappe.website.utils import get_boot_data
|
||||
|
|
@ -100,6 +99,8 @@ class WebsiteSettings(Document):
|
|||
frappe.clear_cache()
|
||||
|
||||
def get_access_token(self):
|
||||
from frappe.integrations.google_oauth import GoogleOAuth
|
||||
|
||||
if not self.indexing_refresh_token:
|
||||
button_label = frappe.bold(_("Allow API Indexing Access"))
|
||||
raise frappe.ValidationError(_("Click on {0} to generate Refresh Token.").format(button_label))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue