summaryrefslogtreecommitdiffstats
path: root/parsers
diff options
context:
space:
mode:
Diffstat (limited to 'parsers')
-rw-r--r--parsers/people.py10
-rw-r--r--parsers/survex.py5
2 files changed, 7 insertions, 8 deletions
diff --git a/parsers/people.py b/parsers/people.py
index f5b234c..7133384 100644
--- a/parsers/people.py
+++ b/parsers/people.py
@@ -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:
diff --git a/parsers/survex.py b/parsers/survex.py
index cf67ed1..6c06307 100644
--- a/parsers/survex.py
+++ b/parsers/survex.py
@@ -1390,7 +1390,6 @@ class LoadingSurvex:
name=blkid,
parent=survexblock,
survexpath=pathlist,
- cave=self.currentcave,
survexfile=self.currentsurvexfile,
legsall=0,
legslength=0.0,
@@ -2050,7 +2049,7 @@ def LoadSurvexBlocks():
survexfileroot = MakeSurvexFileRoot()
# this next makes a block_object assciated with a file_object.path = SURVEX_TOPNAME
survexblockroot = SurvexBlock(
- name=ROOTBLOCK, survexpath="", cave=None, survexfile=survexfileroot, legsall=0, legslength=0.0
+ name=ROOTBLOCK, survexpath="", survexfile=survexfileroot, legsall=0, legslength=0.0
)
# crashes here sometimes on MariaDB complaining that cave_id should not be null. But it should be.
# django.db.utils.IntegrityError: (1048, "Column 'cave_id' cannot be null")
@@ -2061,7 +2060,7 @@ def LoadSurvexBlocks():
omitsfileroot = MakeOmitFileRoot("_unseens.svx")
survexomitsroot = SurvexBlock(
- name=OMITBLOCK, survexpath="", cave=None, survexfile=omitsfileroot, legsall=0, legslength=0.0
+ name=OMITBLOCK, survexpath="", survexfile=omitsfileroot, legsall=0, legslength=0.0
)
survexomitsroot.save()