bug fix
This commit is contained in:
@@ -833,7 +833,7 @@ def cp_from_workoutids(workoutids,debug=False):
|
||||
|
||||
if df.empty:
|
||||
# change this
|
||||
return 2
|
||||
return 0,0,0
|
||||
|
||||
# df is not empty. We continue
|
||||
dfgrouped = df.groupby(['workoutid'])
|
||||
@@ -910,6 +910,8 @@ def handle_updatefitnessmetric(user_id,mode,workoutids,debug=False,
|
||||
|
||||
powerfourmin,power2k,powerhour = cp_from_workoutids(workoutids,debug=debug)
|
||||
|
||||
if powerfourmin > 0 and power2k > 0 and powerhour > 0:
|
||||
|
||||
mdict = {
|
||||
'user_id': user_id,
|
||||
'PowerFourMin': powerfourmin,
|
||||
@@ -921,6 +923,8 @@ def handle_updatefitnessmetric(user_id,mode,workoutids,debug=False,
|
||||
}
|
||||
|
||||
result = fitnessmetric_to_sql(mdict,debug=debug,doclean=True)
|
||||
else:
|
||||
result = 0
|
||||
|
||||
return result
|
||||
|
||||
|
||||
Reference in New Issue
Block a user