Buildings and levels for the floor map, and make every identifier searchable
This commit is contained in:
@@ -476,6 +476,7 @@ def create_asset():
|
||||
locationid=data.get('locationid'),
|
||||
businessunitid=data.get('businessunitid'),
|
||||
mapx=data.get('mapx'),
|
||||
levelid=data.get('levelid'),
|
||||
mapy=data.get('mapy'),
|
||||
notes=data.get('notes')
|
||||
)
|
||||
@@ -517,7 +518,7 @@ def update_asset(asset_id: int):
|
||||
# Update allowed fields
|
||||
allowed_fields = [
|
||||
'assetnumber', 'name', 'serialnumber', 'assettypeid', 'statusid',
|
||||
'locationid', 'businessunitid', 'mapx', 'mapy', 'notes', 'isactive'
|
||||
'locationid', 'businessunitid', 'mapx', 'mapy', 'levelid', 'notes', 'isactive'
|
||||
]
|
||||
|
||||
for key in allowed_fields:
|
||||
@@ -1114,6 +1115,7 @@ def get_assets_map():
|
||||
'displayname': asset.display_name,
|
||||
'serialnumber': asset.serialnumber,
|
||||
'mapx': asset.mapx,
|
||||
'levelid': asset.levelid,
|
||||
'mapy': asset.mapy,
|
||||
'assettype': asset.assettype.assettype if asset.assettype else None,
|
||||
'assettypeid': asset.assettypeid,
|
||||
|
||||
Reference in New Issue
Block a user