summaryrefslogtreecommitdiffstats
path: root/parsers/people.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@gmail.com>2023-10-04 18:22:54 +0300
committerPhilip Sargent <philip.sargent@gmail.com>2023-10-04 18:22:54 +0300
commitbc621efc361e7fc286748ad87a1160956d832c74 (patch)
treeab0d6901900a4f054c8c2bcdc238382dd4f5f51f /parsers/people.py
parent9f4306e367517527d825aacb498eebde1e78c7b2 (diff)
downloadtroggle-bc621efc361e7fc286748ad87a1160956d832c74.tar.gz
troggle-bc621efc361e7fc286748ad87a1160956d832c74.tar.bz2
troggle-bc621efc361e7fc286748ad87a1160956d832c74.zip
wallets-per-person now finding non-survex wallets
Diffstat (limited to 'parsers/people.py')
-rw-r--r--parsers/people.py17
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 = {}