From e40e088e7efa4a590ece2915b10d0af4a05c3b1f Mon Sep 17 00:00:00 2001 From: Curtis Conard Date: Tue, 1 Oct 2024 07:45:29 -0400 Subject: [PATCH] Fix api lookup for computer merge --- ajax/merge.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ajax/merge.php b/ajax/merge.php index d531f61..7640b69 100644 --- a/ajax/merge.php +++ b/ajax/merge.php @@ -77,7 +77,11 @@ $plugin_sync_itemtype = 'PluginJamfMobileSync'; } - $jamf_item = PluginJamfAPI::getMobileDeviceByID($jamf_id, true); + if ($data['jamf_type'] === 'MobileDevice') { + $jamf_item = PluginJamfAPI::getMobileDeviceByID($jamf_id, true); + } else { + $jamf_item = PluginJamfAPI::getComputerByID($jamf_id, true); + } if ($jamf_item === null) { // API error or device no longer exists in Jamf throw new RuntimeException('Jamf API error or item no longer exists!');