seitime-frappe/frappe/patches/v7_2/setup_ldap_config.py
Saurabh 7620bb3789 Deprecate Integration Broker (#2831)
* [fix] remove razorpay from integration service

* [fix] clean-up js side integration service dependancies

* [fix] remove integration service, .py cleanup, move integration request to integration

* [fix] move oauth to integrations and deprecate integration broker

* [fix] mark services enabled and update integrations listing

* [fix] V7.1 and V7.2 integration service related pathch fixes and move payment gateway dotype to core module

* [fix] create payment gateway records if not exists

* [fix] module page for integrations

* [minor][fix] minor checks

* [fix] remove integration broker module only if not allocated to any doctype
2017-03-14 11:24:26 +05:30

21 lines
494 B
Python

import frappe
from frappe.utils import cint
def execute():
frappe.reload_doc("integrations", "doctype", "ldap_settings")
if not frappe.db.exists("DocType", "Integration Service"):
return
if not frappe.db.exists("Integration Service", "LDAP"):
return
if not cint(frappe.db.get_value("Integration Service", "LDAP", 'enabled')):
return
import ldap
try:
ldap_settings = frappe.get_doc("LDAP Settings")
ldap_settings.save(ignore_permissions=True)
except ldap.LDAPError:
pass