Fix Doris Barbell band logging and nav links
Some checks failed
secret-guardrails / artifact-secret-scan (push) Has been cancelled
secret-guardrails / gitleaks (push) Has been cancelled

This commit is contained in:
Fizzlepoof
2026-05-28 21:06:46 +00:00
parent dd4134b1ce
commit ba958f7ef6
9 changed files with 165 additions and 43 deletions

View File

@@ -289,7 +289,9 @@ class JSONStore:
normalized_sets = []
for item in exercise['sets']:
set_count += 1
total_volume_lbs += item['reps'] * item['weight_lbs']
weight_lbs = item.get('weight_lbs')
if weight_lbs is not None:
total_volume_lbs += item['reps'] * weight_lbs
normalized_sets.append(dict(item))
exercises.append({
'exercise_name': exercise['exercise_name'],
@@ -340,10 +342,13 @@ class JSONStore:
stats['last_performed_at'] = workout['performed_at']
for item in exercise['sets']:
stats['set_count'] += 1
stats['max_weight_lbs'] = max(stats['max_weight_lbs'], item['weight_lbs'])
weight_lbs = item.get('weight_lbs')
if weight_lbs is None:
continue
stats['max_weight_lbs'] = max(stats['max_weight_lbs'], weight_lbs)
stats['best_set_estimated_1rm'] = max(
stats['best_set_estimated_1rm'],
_estimated_1rm(item['weight_lbs'], item['reps']),
_estimated_1rm(weight_lbs, item['reps']),
)
results = []
for item in progression.values():