Rework measurements - #2476
Open
rolandgeider wants to merge 60 commits into
Open
Conversation
This can happen if e.g. the user deleted their user and is still logged in on the app
…h-sync)(wger#2328) Changes: * Schema: Added 'is_official' flag and UniqueConstraint to measurements.Category. * Migrations: Created schema migration (0007) and data backfill migration (0008). * API (Serializer/Views): Re-pointed WeightEntry endpoint to read/write from Measurement models using the official 'body_weight' category. * API (Filters): Updated WeightEntryFilterSet to map legacy 'weight' params to the new 'value' column. * Legacy: Marked WeightEntry model as deprecated.
This is not needed, as externally synced entries can be found through other fields, such as the external_id
Measurement categories can optionally point to another category, In practice, this will just be something like blood pressure since these values only make sense in a pair. Others can be interesting while combined (heart rate and steps), but are valid on their own.
# Conflicts: # wger/utils/viewsets.py
Users can enter values in mixed units, external syncs will store their provenance here as well
…ts-and-weight-2328 refactor(weight): migrate WeightEntry to Measurement (wger#2328)
This was forgotten in the previous commits
rolandgeider
added a commit
that referenced
this pull request
Aug 13, 2026
# Conflicts: # CHANGELOG.md
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR reworks the measurements model, making them more flexible and allowing us to sync health data to them
Closes #2417