fix: linting fixes
diff --git a/erpnext/non_profit/doctype/member/member.py b/erpnext/non_profit/doctype/member/member.py
index 2f84cf5..571f87a 100644
--- a/erpnext/non_profit/doctype/member/member.py
+++ b/erpnext/non_profit/doctype/member/member.py
@@ -92,14 +92,15 @@
})
contact.insert()
- except Exception:
- error_log = frappe.log_error(frappe.get_traceback(), _("Contact Creation Failed"))
+ except Exception as e:
+ frappe.log_error(frappe.get_traceback(), _("Contact Creation Failed"))
+ pass
return customer.name
@frappe.whitelist(allow_guest=True)
def create_member_subscription_order(user_details):
- """Summary
+ """Create Member subscription and order for payment
Args:
user_details (TYPE): Description
@@ -117,7 +118,6 @@
"""
# {"plan_id":"IFF Starter","fullname":"Shivam Mishra","mobile":"7506056962","email":"shivam@shivam.dev","pan":"Testing123"}
user_details = frappe._dict(user_details)
- plan = frappe.get_doc("Membership Type", user_details.plan_id)
member = get_or_create_member(user_details)
if not member:
member = create_member(user_details)
diff --git a/erpnext/non_profit/doctype/membership/membership.py b/erpnext/non_profit/doctype/membership/membership.py
index d11f699..a523a23 100644
--- a/erpnext/non_profit/doctype/membership/membership.py
+++ b/erpnext/non_profit/doctype/membership/membership.py
@@ -9,7 +9,7 @@
from datetime import datetime
from frappe.model.document import Document
from frappe.email import sendmail_to_system_managers
-from frappe.utils import add_days, add_years, nowdate, getdate, add_months, cint
+from frappe.utils import add_days, add_years, nowdate, getdate, add_months, get_link_to_form
from frappe import _
import erpnext
@@ -83,7 +83,7 @@
member = get_member_based_on_subscription(subscription.id, payment.email)
except Exception as e:
error_log = frappe.log_error(frappe.get_traceback() + '\n' + data_json , _("Membership Webhook Failed"))
- notify_failure(log)
+ notify_failure(error_log)
raise e
if data.event == "subscription.activated":