Skip to content

Commit

Permalink
add condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Nandhinidevi123 committed Nov 24, 2023
1 parent f09c5f3 commit 86aeacf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def generate_data_from_csv(file_doc, as_dict=False):
if as_dict:
data.append({frappe.scrub(header): row[index] for index, header in enumerate(headers)})
else:
if not row[1]:
if not row[1] and len(row) > 1:
row[1] = row[0]
row[3] = row[2]
data.append(row)
Expand Down

0 comments on commit 86aeacf

Please sign in to comment.