Skip to content

Conversation

@elias170105
Copy link
Contributor

@elias170105 elias170105 commented Nov 30, 2025

Proposed Changes

  • Added bpm_max (PositiveInteger), bpm_avg (PositiveInteger), and duration (DurationField) to the WorkoutLog model to allow tracking of cardio exercises.
  • Updated WorkoutLogSerializer in serializers.py to expose these fields via the API.
  • Added database migration files.

These fields are optional (blank=True, null=True), so they won't enforce data entry for strength training logs.

Note: I could not locate the WorkoutLogForm definition (it seems missing from wger/manager/forms.py in the current file structure). Therefore, this PR currently only enables these fields in the Backend and API, but not yet in the classic Web UI.

Related Issue(s)

(If you have an issue number, replace this line with: Closes #YOUR_ISSUE_NUMBER. If not, you can delete this section.)

Please check that the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Code has been formatted to avoid unnecessary diffs (ruff format && isort .)

Other questions

  • Do users need to run some commands in their local instances due to this PR
    (e.g. database migration, deployment changes)?

Yes, database migrations are required:
python manage.py migrate

@elias170105 elias170105 marked this pull request as ready for review November 30, 2025 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant