Skip to content

refactor(manager): Remove day-id inference workaround from WorkoutLog.save() (#2481) - #2484

Open
pankaj-basnet wants to merge 1 commit into
wger-project:masterfrom
pankaj-basnet:refactor/remove-day-id-workaround-2481
Open

refactor(manager): Remove day-id inference workaround from WorkoutLog.save() (#2481)#2484
pankaj-basnet wants to merge 1 commit into
wger-project:masterfrom
pankaj-basnet:refactor/remove-day-id-workaround-2481

Conversation

@pankaj-basnet

Copy link
Copy Markdown
Contributor

Proposed Changes

Removes the day-inference workaround added for #2460 . WorkoutLog.save() no longer guesses a session's day from slot_entry → slot → day, either when auto-creating a session or by re-scanning a session's logs after save. day is now only ever set from what's explicitly provided — no more extra per-save queries.

Migration 0028_backfill_session_day.py is left untouched;

Tests: updated test_log_model.py — removed inference-behavior tests,

Related Issue(s)

Closes #2481.

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 .)
  • If the feature is big enough or if there are manual steps needed (deployment
    changes etc.), write a small writeup in CHANGELOG.md

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.

Remove day-id workaround

1 participant