Skip to content

Commit

Permalink
only get account id if profile is found
Browse files Browse the repository at this point in the history
  • Loading branch information
almenscorner committed Mar 20, 2024
1 parent d69bc11 commit de7123f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/IntuneCD/update/Intune/AppleEnrollmentProfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit de7123f

Please sign in to comment.