diff --git a/core/views/wallets_edit.py b/core/views/wallets_edit.py index 4e37c6e26..df050c049 100644 --- a/core/views/wallets_edit.py +++ b/core/views/wallets_edit.py @@ -876,7 +876,10 @@ def walletedit(request, path=None): else: people = waldata["people"] # text string for person in waldata["people"]: - person_id = who_is_this(year, person) + try: + person_id = who_is_this(year, person) + except: + continue print(f"walletedit: {person}, {person_id}") persons.append(Person.objects.get(slug=person_id)) diff --git a/parsers/people.py b/parsers/people.py index 6f4404374..40a864636 100644 --- a/parsers/people.py +++ b/parsers/people.py @@ -263,7 +263,11 @@ def ensure_users_are_persons(): def who_is_this(year, possibleid): expo = Expedition.objects.filter(year=year)[0] - personexpedition = GetPersonExpeditionNameLookup(expo)[possibleid.lower()] + gpel = GetPersonExpeditionNameLookup(expo) + if possibleid.lower() in gpel: + personexpedition = gpel[possibleid.lower()] + else: + raise if personexpedition: return personexpedition.person else: