Private
Public Access
1
0

some refinements

This commit is contained in:
Sander Roosendaal
2020-05-27 09:22:09 +02:00
parent 11685f3126
commit eb41a5f17f
3 changed files with 30 additions and 10 deletions

View File

@@ -66,16 +66,28 @@ def save_scoring(name,user,filename,id=0,notes=""):
try:
sex = row['Gender']
if sex.lower() in ['m','men','male','open']:
sex = 'male'
elif sex.lower() in ['mix','mixed']:
sex = 'mixed'
else:
sex = 'female'
except KeyError:
sex = 'F'
sex = 'female'
try:
weightclass = row['WeightClass']
if weightclass.lower() in ['hwt','h','o','heavy','open']:
weightclass = 'hwt'
elif weightclass.lower() in ['lwt','l','light','lights','lighties']:
weightclass = 'lwt'
except KeyError:
weightclass = 'hwt'
try:
adaptiveclass = row['AdaptiveClass']
if adaptiveclass.lower() in ['o','open','none','no']:
adaptiveclass = None
except KeyError:
adaptiveclass = None