chore: use .format for message

Co-authored-by: Sagar Vora <sagar@resilient.tech>
This commit is contained in:
Shivam Mishra 2020-09-30 12:00:46 +05:30 committed by GitHub
parent 0bd8719035
commit 3ec67077a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -224,7 +224,7 @@ def trigger_razorpay_subscription(*args, **kwargs):
member.subscription_activated = 1
member.save(ignore_permissions=True)
except Exception as e:
message = e + '\n\n' + frappe.get_traceback() + '\n\n' + payment.id
message = "{0}\n\n{1}\n\n{2}: {3}".format(e, frappe.get_traceback(), __("Payment ID"), payment.id)
log = frappe.log_error(message, "Error creating membership entry for {0}".format(member.name))
notify_failure(log)
return { 'status': 'Failed', 'reason': e}
@ -251,4 +251,4 @@ def get_plan_from_razorpay_id(plan_id):
try:
return plan[0]['name']
except:
return None
return None