fix: fail migration due to None type during v13_0.update_returned_qty_in_pr_dn (#27430)

* fix: fail migration due to None type

* fix: incorrect key: value pair in filter.

Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
This commit is contained in:
Devin Slauenwhite
2021-09-11 08:22:49 -04:00
committed by GitHub
parent 8337ec9fe0
commit becf471a3a

View File

@@ -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: