Skip to content

Commit

Permalink
(loaddeployment plugin) Fix hostname
Browse files Browse the repository at this point in the history
Remove after the dot as we only want the hostname and not the fqdn.
  • Loading branch information
neoclust committed Jun 8, 2021
1 parent 3acab45 commit 04d45c2
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,7 @@ def scheduledeploy(self):
resultpresence = XmppMasterDatabase().getPresenceExistuuids(UUID)
re_search = []
if resultpresence[UUID][1] == 0:
## il n'y a pas de uuid glpi
re_search = XmppMasterDatabase().getMachinedeployexistonHostname(deployobject['name'])
re_search = XmppMasterDatabase().getMachinedeployexistonHostname(deployobject['name'].split('.')[0])
if self.Recover_GLPI_Identifier_from_name and len(re_search) == 1:
update_result = XmppMasterDatabase().update_uuid_inventory(re_search[0]['id'], UUID)
if update_result is not None:
Expand Down

0 comments on commit 04d45c2

Please sign in to comment.