Removed unused properties and moving

This commit is contained in:
2023-01-30 22:27:17 +00:00
parent 7808005498
commit e35fccea5d
5 changed files with 18 additions and 21 deletions

View File

@@ -89,7 +89,7 @@ def load_people_expos():
name = re.sub(r"<.*?>", "", name)
firstname = ""
nickname = ""
nick = ""
rawlastname = personline[header["Lastname"]].strip()
matchlastname = re.match(r"^([\w&;\s]+)(?:\(([^)]*)\))?", rawlastname)
@@ -98,7 +98,7 @@ def load_people_expos():
splitnick = re.match(r"^([\w&;\s]+)(?:\(([^)]*)\))?", name)
fullname = splitnick.group(1)
nickname = splitnick.group(2) or ""
nick = splitnick.group(2) or ""
fullname = fullname.strip()
names = fullname.split(" ")
@@ -112,7 +112,7 @@ def load_people_expos():
vfho = True
lookupAttribs = {"first_name": firstname, "last_name": (lastname or "")}
nonLookupAttribs = {"is_vfho": vfho, "fullname": fullname, "nickname": nickname}
nonLookupAttribs = {"is_vfho": vfho, "fullname": fullname, "nickname": nick}
person = Person.objects.create(**nonLookupAttribs, **lookupAttribs)
parse_blurb(personline=personline, header=header, person=person)
@@ -122,7 +122,7 @@ def load_people_expos():
expedition = Expedition.objects.get(year=year)
if attended == "1" or attended == "-1":
lookupAttribs = {"person": person, "expedition": expedition}
nonLookupAttribs = {"nickname": nickname, "is_guest": (personline[header["Guest"]] == "1")}
nonLookupAttribs = {"is_guest": (personline[header["Guest"]] == "1")}
pe = PersonExpedition.objects.create(**nonLookupAttribs, **lookupAttribs)
print("", flush=True)
@@ -214,7 +214,7 @@ def GetPersonExpeditionNameLookup(expedition):
f = unidecode(unescape(personexpedition.person.first_name.lower()))
l = unidecode(unescape(personexpedition.person.last_name.lower()))
full = unidecode(unescape(personexpedition.person.fullname.lower()))
n = unidecode(unescape(personexpedition.nickname.lower()))
n = unidecode(unescape(personexpedition.person.nickname.lower()))
if full not in possnames:
possnames.append(full)
if n not in possnames: