diff --git a/src/IntuneCD/update/Intune/AppleEnrollmentProfile.py b/src/IntuneCD/update/Intune/AppleEnrollmentProfile.py index fe5f3cb7..123a7ea7 100644 --- a/src/IntuneCD/update/Intune/AppleEnrollmentProfile.py +++ b/src/IntuneCD/update/Intune/AppleEnrollmentProfile.py @@ -40,13 +40,13 @@ def _get_profile_item_and_account_id( tuple[dict, str]: The profile item and account ID of the Apple Enrollment Profile """ profile_item = None + account_id = None for profile in profile_data: if profile["displayName"] == repo_data["displayName"]: profile_item = profile + account_id = profile_item["id"].split("_")[0] break - account_id = profile_item["id"].split("_")[0] - if not account_id or not profile_item: return None, None