fix: discard empty rows from update items (#27021) (#27095)

(cherry picked from commit 6de7b8ea93)

Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
This commit is contained in:
Frappe PR Bot
2021-08-24 12:20:51 +05:30
committed by GitHub
parent 352157c9fc
commit 1e3a6a8a98
2 changed files with 6 additions and 1 deletions

View File

@@ -1841,6 +1841,11 @@ def update_child_qty_rate(parent_doctype, trans_items, parent_doctype_name, chil
for d in data:
new_child_flag = False
if not d.get("item_code"):
# ignore empty rows
continue
if not d.get("docname"):
new_child_flag = True
check_doc_permissions(parent, 'create')