mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-12 06:48:31 +00:00
add condition
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user