Correctifs
This commit is contained in:
@ -55,6 +55,7 @@ class GLPIAPI:
|
|||||||
|
|
||||||
return deviceID, data, search["totalcount"]
|
return deviceID, data, search["totalcount"]
|
||||||
elif(search["totalcount"] > 1):
|
elif(search["totalcount"] > 1):
|
||||||
|
deviceID = list(search["data"].keys())
|
||||||
return deviceID, search["data"], search["totalcount"]
|
return deviceID, search["data"], search["totalcount"]
|
||||||
else:
|
else:
|
||||||
return None, None, 0
|
return None, None, 0
|
||||||
|
|||||||
@ -182,8 +182,12 @@ class AirwatchDevice:
|
|||||||
self.GroupId = device["LocationGroupId"]["Id"]["Value"]
|
self.GroupId = device["LocationGroupId"]["Id"]["Value"]
|
||||||
self.Group = device["LocationGroupName"]
|
self.Group = device["LocationGroupName"]
|
||||||
self.GroupUuid = device["LocationGroupId"]["Uuid"]
|
self.GroupUuid = device["LocationGroupId"]["Uuid"]
|
||||||
self.UserId = device["UserId"]["Id"]["Value"]
|
if(device["UserId"].get("Id") != None):
|
||||||
self.User = device["UserName"]
|
self.UserId = device["UserId"]["Id"]["Value"]
|
||||||
|
self.User = device["UserName"]
|
||||||
|
else:
|
||||||
|
self.UserId = None
|
||||||
|
self.User = None
|
||||||
self.UserEmail = device["UserEmailAddress"]
|
self.UserEmail = device["UserEmailAddress"]
|
||||||
self.PlatformId = device["PlatformId"]["Id"]["Value"]
|
self.PlatformId = device["PlatformId"]["Id"]["Value"]
|
||||||
self.Platform = device["Platform"]
|
self.Platform = device["Platform"]
|
||||||
|
|||||||
Reference in New Issue
Block a user