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 <ankush@iwebnotes.com>
(cherry picked from commit becf471a3a238cfaa20a8940e0106c7e0e0386c2)

Co-authored-by: Devin Slauenwhite <devin.slauenwhite@gmail.com>
This commit is contained in:
Frappe PR Bot 2021-09-11 17:54:55 +05:30 committed by GitHub
parent dae0a1c1d6
commit a52d4c25ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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: