diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py index 606cc908669..2a22b32637b 100644 --- a/erpnext/controllers/selling_controller.py +++ b/erpnext/controllers/selling_controller.py @@ -330,7 +330,7 @@ class SellingController(StockController): self.make_sl_entries(sl_entries) def set_po_nos(self): - if self.doctype in ("Delivery Note", "Sales Invoice"): + if self.doctype in ("Delivery Note", "Sales Invoice") and hasattr(self, "items"): ref_fieldname = "against_sales_order" if self.doctype == "Delivery Note" else "sales_order" sales_orders = list(set([d.get(ref_fieldname) for d in self.items if d.get(ref_fieldname)])) if sales_orders: diff --git a/erpnext/education/report/course_wise_assessment_report/course_wise_assessment_report.py b/erpnext/education/report/course_wise_assessment_report/course_wise_assessment_report.py index 5badda6565a..ce581486ec3 100644 --- a/erpnext/education/report/course_wise_assessment_report/course_wise_assessment_report.py +++ b/erpnext/education/report/course_wise_assessment_report/course_wise_assessment_report.py @@ -245,5 +245,5 @@ def get_child_assessment_groups(assessment_group): assessment_groups = [d.get("value") for d in get_children("Assessment Group", assessment_group) if d.get("value") and not d.get("expandable")] else: - assessment_groups = [args.assessment_group] + assessment_groups = [assessment_group] return assessment_groups diff --git a/erpnext/patches/v10_0/update_hub_connector_domain.py b/erpnext/patches/v10_0/update_hub_connector_domain.py index fc3c29403f4..808ae77129f 100644 --- a/erpnext/patches/v10_0/update_hub_connector_domain.py +++ b/erpnext/patches/v10_0/update_hub_connector_domain.py @@ -1,8 +1,9 @@ import frappe def execute(): - frappe.db.sql(""" - UPDATE `tabData Migration Connector` - SET hostname = 'https://hubmarket.org' - WHERE connector_name = 'Hub Connector' - """) \ No newline at end of file + if frappe.db.table_exists("Data Migration Connector"): + frappe.db.sql(""" + UPDATE `tabData Migration Connector` + SET hostname = 'https://hubmarket.org' + WHERE connector_name = 'Hub Connector' + """) \ No newline at end of file