summaryrefslogtreecommitdiffstats
path: root/parsers/people.py
diff options
context:
space:
mode:
Diffstat (limited to 'parsers/people.py')
-rw-r--r--parsers/people.py19
1 files changed, 10 insertions, 9 deletions
diff --git a/parsers/people.py b/parsers/people.py
index ef6984b..4799ebf 100644
--- a/parsers/people.py
+++ b/parsers/people.py
@@ -78,15 +78,16 @@ def load_people_expos():
if nexpos <= 0:
print(" - Creating expeditions")
for year in years:
- lookupAttribs = {"year": year}
- nonLookupAttribs = {"name": f"CUCC expo {year}"}
- e = Expedition.objects.create(**nonLookupAttribs, **lookupAttribs)
+ coUniqueAttribs = {"year": year}
+ otherAttribs = {"name": f"CUCC expo {year}"}
+ e = Expedition.objects.create(**otherAttribs, **coUniqueAttribs)
print(" - Loading personexpeditions")
for personline in personreader:
name = personline[header["Name"]]
name = re.sub(r"<.*?>", "", name)
+ slug = slugify(name)
firstname = ""
nick = ""
@@ -111,9 +112,9 @@ def load_people_expos():
else:
vfho = True
- lookupAttribs = {"first_name": firstname, "last_name": (lastname or "")}
- nonLookupAttribs = {"is_vfho": vfho, "fullname": fullname, "nickname": nick}
- person = Person.objects.create(**nonLookupAttribs, **lookupAttribs)
+ coUniqueAttribs = {"first_name": firstname, "last_name": (lastname or "")}
+ otherAttribs = {"is_vfho": vfho, "fullname": fullname, "nickname": nick}
+ person = Person.objects.create(**otherAttribs, **coUniqueAttribs)
parse_blurb(personline=personline, header=header, person=person)
@@ -121,9 +122,9 @@ def load_people_expos():
for year, attended in list(zip(headers, personline))[5:]:
expedition = Expedition.objects.get(year=year)
if attended == "1" or attended == "-1":
- lookupAttribs = {"person": person, "expedition": expedition}
- nonLookupAttribs = {"is_guest": (personline[header["Guest"]] == "1")}
- pe = PersonExpedition.objects.create(**nonLookupAttribs, **lookupAttribs)
+ coUniqueAttribs = {"person": person, "expedition": expedition}
+ otherAttribs = {"is_guest": (personline[header["Guest"]] == "1")}
+ pe = PersonExpedition.objects.create(**otherAttribs, **coUniqueAttribs)
print("", flush=True)