mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-29 18:04:46 +00:00
[rename tool] [fix] condition to validate that content exists in a row of the uploaded file
This commit is contained in:
@@ -34,7 +34,8 @@ def upload(select_doctype=None, rows=None):
|
|||||||
|
|
||||||
rename_log = []
|
rename_log = []
|
||||||
for row in rows:
|
for row in rows:
|
||||||
if len(row) > 2:
|
# if row has some content
|
||||||
|
if len(row) > 1 and row[0] and row[1]:
|
||||||
try:
|
try:
|
||||||
if rename_doc(select_doctype, row[0], row[1]):
|
if rename_doc(select_doctype, row[0], row[1]):
|
||||||
rename_log.append(_("Successful: ") + row[0] + " -> " + row[1])
|
rename_log.append(_("Successful: ") + row[0] + " -> " + row[1])
|
||||||
|
|||||||
Reference in New Issue
Block a user