run patch only if DocType Social Login Keys exists
This commit is contained in:
parent
02aa7b6f41
commit
0309eddec8
1 changed files with 3 additions and 0 deletions
|
|
@ -46,6 +46,9 @@ def execute():
|
|||
# Create Social Login Key(s) from Social Login Keys
|
||||
frappe.reload_doc("integrations", "doctype", "social_login_key", force=True)
|
||||
|
||||
if not frappe.db.exists('DocType', 'Social Login Keys'):
|
||||
return
|
||||
|
||||
social_login_keys = frappe.get_doc("Social Login Keys", "Social Login Keys")
|
||||
if social_login_keys.facebook_client_id or social_login_keys.facebook_client_secret:
|
||||
facebook_login_key = frappe.new_doc("Social Login Key")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue