1.2
This commit is contained in:
parent
5614a714bc
commit
e741fe47b1
Binary file not shown.
@ -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}")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user