mirror of
https://github.com/wger-project/flutter.git
synced 2026-11-29 01:18:35 +01:00
Not copying an exercise that isn't there keeps the crash away, but gym mode then holds a log with no exercise, which would bite the next reader. The past logs widget already knows the exercise from the set config, so pass it down to setLog, which assigns it through the exercise setter so that exerciseId stays consistent. The notifier test worked around the old behaviour by setting exerciseObj on every fixture, with a comment explaining that copyWith needs it. That was the bug, written down, so it's gone. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XzxNFoPMxsFPxHD3P2Ma3w