fix: Validate Payment Gateway only if it exists in Payment Request. (#21805)

This commit is contained in:
Marica 2020-05-20 16:13:43 +05:30 committed by GitHub
parent 91a9d3fbe5
commit 2b04e8eef0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,7 +69,7 @@ class PaymentRequest(Document):
elif self.payment_request_type == 'Inward':
self.db_set('status', 'Requested')
send_mail = self.payment_gateway_validation()
send_mail = self.payment_gateway_validation() if self.payment_gateway else None
ref_doc = frappe.get_doc(self.reference_doctype, self.reference_name)
if (hasattr(ref_doc, "order_type") and getattr(ref_doc, "order_type") == "Shopping Cart") \