diff options
Diffstat (limited to 'parsers/people.py')
-rw-r--r-- | parsers/people.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/parsers/people.py b/parsers/people.py index 01998e1..0e4ca30 100644 --- a/parsers/people.py +++ b/parsers/people.py @@ -170,6 +170,20 @@ def who_is_this(year, possibleid): return None +def when_on_expo(name): + """Returns a list of PersonExpedition objects for the string, if recognised as a name + """ + person_expos = [] + expos = Expedition.objects.all() + for expo in expos: + expoers = GetPersonExpeditionNameLookup(expo) + if name in expoers: + person_expos.append(expoers[name]) + print(f"{name} => {expoers[name]}") + + return person_expos + + global foreign_friends foreign_friends = [ "Aiko", @@ -207,7 +221,8 @@ def known_foreigner(id): # Refactor. The dict GetPersonExpeditionNameLookup(expo) indexes by name and has values of personexpedition -# This is convoluted, the whole personexpedition concept is unnecessary? +# This is convoluted, the personexpedition concept is unnecessary, should it just retunr person?? +# Or better, query with a string and return a list of personexpeditions Gpersonexpeditionnamelookup = {} |