fix: validate if client is and secret both set
This commit is contained in:
parent
2c56796e2d
commit
5993c42d04
1 changed files with 6 additions and 2 deletions
|
|
@ -3,8 +3,12 @@
|
|||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
# import frappe
|
||||
import frappe
|
||||
from frappe import _
|
||||
from frappe.model.document import Document
|
||||
|
||||
class GoogleSettings(Document):
|
||||
pass
|
||||
|
||||
def validate(self):
|
||||
if (self.client_id and not self.client_secret) or (not self.client_id and self.client_secret):
|
||||
frappe.throw(_("Set Client ID and Client Secret for Google Integrations."))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue