2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-12-16 13:57:09 +00:00

separated out Model for wallet to its own file

This commit is contained in:
2023-01-29 16:23:58 +00:00
parent f73640522b
commit 432be660a4
7 changed files with 310 additions and 291 deletions

View File

@@ -121,7 +121,7 @@ def get_offending_filename(path):
"""
return "/survexfile/" + path + ".svx"
trip_people_cache = {} # DANGEROUS, should clean it on PUSH/POP begin/end
trip_people_cache = {} # per survexblock, so robust wrt PUSH/POP begin/end
def get_team_on_trip(survexblock):
"""Uses a cache to avoid a database query if it doesn't need to.
Only used for complete team."""
@@ -145,7 +145,7 @@ def get_people_on_trip(survexblock):
return list(set(people))
trip_person_cache = {} # pre survexblock, so robust wrt PUSH/POP begin/end
trip_person_cache = {} # per survexblock, so robust wrt PUSH/POP begin/end
def put_person_on_trip(survexblock, personexpedition, tm):
"""Uses a cache to avoid a database query if it doesn't need to.
Only used for a single person"""
@@ -170,7 +170,7 @@ def put_person_on_trip(survexblock, personexpedition, tm):
trip_person_cache[(survexblock, personexpedition)] = 1
return False
person_pending_cache = {} # pre survexblock, so robust wrt PUSH/POP begin/end
person_pending_cache = {} # per survexblock, so robust wrt PUSH/POP begin/end
def add_to_pending(survexblock, tm):
"""Collects team names before we have a date so cannot validate against
expo attendance yet"""
@@ -354,7 +354,7 @@ class LoadingSurvex:
knowing the year. Unless its parent has an identified expo"""
if survexblock.parent.name == "troggle_unseens":
# Bolluxed up if we try to inherit from this random junk
# Bolluxed up if we try to inherit from this random junk, so don't.
return
expo = survexblock.expedition # may be None if no *date yet