diff --git a/odins_spear/scripts/user_association.py b/odins_spear/scripts/user_association.py index 5bbe73d..6a0f572 100644 --- a/odins_spear/scripts/user_association.py +++ b/odins_spear/scripts/user_association.py @@ -42,7 +42,10 @@ def main(api, service_provider_id: str, group_id: str, user_id: str): USER_DATA["aliases"] = user["aliases"] pick_up_group = api.get.call_pickup_group_user(service_provider_id, group_id, user_id) - USER_DATA["pickUpGroup"] = pick_up_group[0]["name"] + try: + USER_DATA["pickUpGroup"] = pick_up_group[0]["name"] + except IndexError: + USER_DATA["pickUpGroup"] = None hunt_groups = api.get.group_hunt_group_user(service_provider_id, group_id, user_id) for hg in tqdm(hunt_groups, desc="Fetching Hunt Groups"):