2d94f99356
The previous query used >= on start_time with no upper bound, so it matched ALL activities of that sport type starting after the given minute on that day — crashing with MultipleResultsFound whenever two such activities existed. Fix: bound the window to ±60s from start_time and use .scalars().first() so the query returns at most one Activity rather than raising on duplicates. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>