Closed spgh-dev closed 3 years ago
def getDetailsByTag(self, server, token, **AssetTAG**):
"""Get asset details by ID
Arguments:
server {string} -- Server URI
token {string} -- Token value to be used for accessing the API
AssetTAG {string} -- Asset TAG
Returns:
[string] -- Asset details from the server, in JSON formatted
"""
self.uri = '/api/v1/hardware/bytag/' + str(**AssetTag**)
self.server = server + self.uri
headers = {'Authorization': 'Bearer ' + token}
results = requests.get(self.server, headers=headers)
return results.content
This is still an issue. I pip installed the latest version today and the mismatched spelling of AssetTAG/AssetTag still exists.
File "C:\Users\path_goes_here\venv\lib\site-packages\snipeit\Assets.py", line 276, in getDetailsByTag self.uri = '/api/v1/hardware/bytag/' + str(AssetTag) NameError: name 'AssetTag' is not defined
Patch just merged
A typo in the AssetTag parameter is generating an exception