From a52d4c25fffbfbb2465b955fddafe8a47f531523 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Sat, 11 Sep 2021 17:54:55 +0530 Subject: [PATCH] fix: fail migration due to None type during v13_0.update_returned_qty_in_pr_dn (#27430) (#27436) * fix: fail migration due to None type * fix: incorrect key: value pair in filter. Co-authored-by: Ankush Menat (cherry picked from commit becf471a3a238cfaa20a8940e0106c7e0e0386c2) Co-authored-by: Devin Slauenwhite --- erpnext/patches/v13_0/update_returned_qty_in_pr_dn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/patches/v13_0/update_returned_qty_in_pr_dn.py b/erpnext/patches/v13_0/update_returned_qty_in_pr_dn.py index efb3a5961f..dd64e05ec1 100644 --- a/erpnext/patches/v13_0/update_returned_qty_in_pr_dn.py +++ b/erpnext/patches/v13_0/update_returned_qty_in_pr_dn.py @@ -13,7 +13,7 @@ def execute(): frappe.reload_doc('stock', 'doctype', 'stock_settings') def update_from_return_docs(doctype): - for return_doc in frappe.get_all(doctype, filters={'is_return' : 1, 'docstatus' : 1}): + for return_doc in frappe.get_all(doctype, filters={'is_return' : 1, 'docstatus' : 1, 'return_against': ('!=', '')}): # Update original receipt/delivery document from return return_doc = frappe.get_cached_doc(doctype, return_doc.name) try: