mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2026-02-08 09:26:47 +00:00
wallets-per-person now finding non-survex wallets
This commit is contained in:
@@ -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 = {}
|
||||
|
||||
|
||||
@@ -30,6 +30,8 @@ def load_all_scans():
|
||||
|
||||
It does NOT read or validate anything in the JSON data attached to each wallet. Those checks
|
||||
are done at runtime, when a wallet is accessed, not at import time.
|
||||
|
||||
Loads people as a simple string of fullnames. We should replace this with a list of Person slugs.
|
||||
|
||||
"""
|
||||
print(" - Loading Survey Scans")
|
||||
|
||||
@@ -153,7 +153,7 @@ def get_team_on_trip(survexblock):
|
||||
def get_people_on_trip(survexblock):
|
||||
"""Gets the displayable names of the people on a survexbock trip.
|
||||
Only used for complete team."""
|
||||
qpeople = get_team_on_trip(survexblock)
|
||||
qpeople = get_team_on_trip(survexblock) # qpeople is a Query List
|
||||
|
||||
people = []
|
||||
for p in qpeople:
|
||||
|
||||
Reference in New Issue
Block a user