fix: remove 'callback' field

This commit is contained in:
barredterra 2020-09-27 19:42:27 +02:00
parent 565c217726
commit b4bfcc734e
2 changed files with 2 additions and 14 deletions

View file

@ -1,6 +1,5 @@
{
"actions": [],
"autoname": "field:callback",
"beta": 1,
"creation": "2019-01-24 15:51:06.362222",
"doctype": "DocType",
@ -12,7 +11,6 @@
"base_url",
"cb_00",
"openid_configuration",
"callback",
"sb_client_credentials_section",
"client_id",
"redirect_uri",
@ -45,13 +43,6 @@
"fieldtype": "Data",
"label": "OpenID Configuration"
},
{
"fieldname": "callback",
"fieldtype": "Data",
"label": "Callback",
"read_only": 1,
"unique": 1
},
{
"collapsible": 1,
"fieldname": "sb_client_credentials_section",
@ -137,7 +128,7 @@
"link_fieldname": "connected_app"
}
],
"modified": "2020-09-27 19:16:31.039086",
"modified": "2020-09-27 19:29:17.835067",
"modified_by": "Administrator",
"module": "Integrations",
"name": "Connected App",

View file

@ -20,9 +20,6 @@ class ConnectedApp(Document):
in a Token Cache.
"""
def autoname(self):
self.callback = frappe.scrub(self.provider_name)
def validate(self):
try:
base_url = frappe.request.host_url
@ -30,7 +27,7 @@ class ConnectedApp(Document):
# for tests
base_url = frappe.get_site_config().host_name or 'http://localhost:8000'
callback_path = '/api/method/frappe.integrations.doctype.connected_app.connected_app.callback/' + self.callback
callback_path = '/api/method/frappe.integrations.doctype.connected_app.connected_app.callback/' + self.name
self.redirect_uri = urljoin(base_url, callback_path)
def get_oauth2_session(self):