fix: simplify merge condition statement
Co-authored-by: gavin <gavin18d@gmail.com>
This commit is contained in:
parent
2c9f08997a
commit
12e4b33a1f
1 changed files with 1 additions and 1 deletions
|
|
@ -471,7 +471,7 @@ def bulk_rename(doctype, rows=None, via_console = False):
|
|||
for row in rows:
|
||||
# if row has some content
|
||||
if len(row) > 1 and row[0] and row[1]:
|
||||
merge = True if len(row) > 2 and (row[2] == "1" or row[2].lower() == "true") else False
|
||||
merge = len(row) > 2 and (row[2] == "1" or row[2].lower() == "true")
|
||||
try:
|
||||
if rename_doc(doctype, row[0], row[1], merge=merge):
|
||||
msg = _("Successful: {0} to {1}").format(row[0], row[1])
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue