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
next(reader)
for row in reader:
print(f"Processing row: {row}")
Application.objects.create(
name=row[0],
version=row[1],
vendor=row[2],
)
if row and len(row) == 3:
print(f"Processing row: {row}")
Application.objects.create(
name=row[0],
version=row[1],
vendor=row[2],
)
return redirect('dashboard')
except Exception as e:
print(f"An error occurred: {e}")