This commit is contained in:
Flatlogic Bot 2025-10-28 05:01:04 +00:00
parent 5614a714bc
commit e741fe47b1
2 changed files with 7 additions and 6 deletions

View File

@ -33,12 +33,13 @@ def upload_inventory(request):
# Skip header row # Skip header row
next(reader) next(reader)
for row in reader: for row in reader:
print(f"Processing row: {row}") if row and len(row) == 3:
Application.objects.create( print(f"Processing row: {row}")
name=row[0], Application.objects.create(
version=row[1], name=row[0],
vendor=row[2], version=row[1],
) vendor=row[2],
)
return redirect('dashboard') return redirect('dashboard')
except Exception as e: except Exception as e:
print(f"An error occurred: {e}") print(f"An error occurred: {e}")