Model photo upload fixes; network devices linked to catalog models
This commit is contained in:
@@ -346,7 +346,7 @@ def create_network_device():
|
||||
|
||||
Optional fields:
|
||||
- name, serialnumber, statusid, locationid, businessunitid
|
||||
- networkdevicetypeid, vendorid, hostname
|
||||
- networkdevicetypeid, vendorid, modelnumberid, hostname
|
||||
- firmwareversion, portcount, ispoe, ismanaged, rackunit
|
||||
- mapx, mapy, notes
|
||||
"""
|
||||
@@ -408,6 +408,7 @@ def create_network_device():
|
||||
assetid=asset.assetid,
|
||||
networkdevicetypeid=data.get('networkdevicetypeid'),
|
||||
vendorid=data.get('vendorid'),
|
||||
modelnumberid=data.get('modelnumberid'),
|
||||
hostname=data.get('hostname'),
|
||||
firmwareversion=data.get('firmwareversion'),
|
||||
portcount=data.get('portcount'),
|
||||
@@ -495,7 +496,7 @@ def update_network_device(device_id: int):
|
||||
setattr(asset, key, data[key])
|
||||
|
||||
# Update network device fields
|
||||
netdev_fields = ['networkdevicetypeid', 'vendorid', 'hostname',
|
||||
netdev_fields = ['networkdevicetypeid', 'vendorid', 'modelnumberid', 'hostname',
|
||||
'firmwareversion', 'portcount', 'ispoe', 'ismanaged', 'rackunit']
|
||||
for key in netdev_fields:
|
||||
if key in data:
|
||||
|
||||
Reference in New Issue
Block a user