Merge tag 'v8.52' into develop
bug fix
This commit is contained in:
@@ -48,7 +48,12 @@ def cpfit(powerdf):
|
||||
theavpower = powerdf['CP']
|
||||
|
||||
if len(thesecs)>=4:
|
||||
p1, success = optimize.leastsq(errfunc, p0[:], args = (thesecs,theavpower))
|
||||
try:
|
||||
p1, success = optimize.leastsq(errfunc, p0[:], args = (thesecs,theavpower))
|
||||
except:
|
||||
factor = fitfunc(p0,thesecs.mean())/theavpower.mean()
|
||||
p1 = [p0[0]/factor,p0[1]/factor,p0[2],p0[3]]
|
||||
|
||||
else:
|
||||
factor = fitfunc(p0,thesecs.mean())/theavpower.mean()
|
||||
p1 = [p0[0]/factor,p0[1]/factor,p0[2],p0[3]]
|
||||
|
||||
@@ -4756,10 +4756,19 @@ def oterankings_view(request,theuser=0,
|
||||
pieceunit = form.cleaned_data['pieceunit']
|
||||
else:
|
||||
value = None
|
||||
|
||||
try:
|
||||
trankingdistances = form.cleaned_data['trankingdistances']
|
||||
except KeyError:
|
||||
trankingdistances = []
|
||||
|
||||
trankingdistances = form.cleaned_data['trankingdistances']
|
||||
trankingdistances = [int(d) for d in trankingdistances]
|
||||
trankingdurations = form.cleaned_data['trankingdurations']
|
||||
|
||||
try:
|
||||
trankingdurations = form.cleaned_data['trankingdurations']
|
||||
except KeyError:
|
||||
trankingdurations = []
|
||||
|
||||
trankingdurations = [
|
||||
datetime.datetime.strptime(d,"%H:%M:%S").time() for d in trankingdurations
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user