1a4e51c95a7ade02c8e6d14c1179383f85371314
The `NameWithIcon()` function had a `platform` parameter that was immediately overwritten by `platform = None` and never used (dead code). The function mixed data lookup (database queries via IDs) with rendering, making it untestable. **Fix**: Refactored `NameWithIcon()` to follow the `LinkedPurchase` pattern — accepts model objects (`Game`, `Session`) instead of IDs. Extracted `_resolve_name_with_icon()` helper for testable computation logic (name resolution, platform extraction, link creation). Fixed bug where `platform` was not extracted when `session` parameter was passed. Removed dead `platform` parameter from the public API. Updated all 3 production call sites (already using model objects). Added 10 unit tests for `_resolve_name_with_icon()` covering session override, custom names, linkify behavior, platform resolution, and edge cases. Updated 6 integration tests to use model-based parameters.
Timetracker
A simple game catalogue and play session tracker.
Development
The project uses pyenv to manage installed Python versions.
If you have pyenv installed, you can simply run:
make init
This will make sure the correct Python version is installed, and it will install all dependencies using poetry.
Afterwards, you can start the development server using make dev.
Description
Releases
23
Languages
Python
43.7%
CSS
28.1%
HTML
24%
JavaScript
3.3%
Dockerfile
0.4%
Other
0.5%