From 0309eddec8b8980505b412680c19fa7110551e7e Mon Sep 17 00:00:00 2001 From: Saurabh Date: Wed, 3 Jan 2018 16:26:28 +0530 Subject: [PATCH] run patch only if DocType Social Login Keys exists --- frappe/patches/v10_0/refactor_social_login_keys.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frappe/patches/v10_0/refactor_social_login_keys.py b/frappe/patches/v10_0/refactor_social_login_keys.py index 9f1f0b4afc..a631be26dc 100644 --- a/frappe/patches/v10_0/refactor_social_login_keys.py +++ b/frappe/patches/v10_0/refactor_social_login_keys.py @@ -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")