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
|
# 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}")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user