e3b53cd4a973e230078e874c69b461cc8dce146e
Replace fragile price change detection in Purchase.save() with a lazy dirty flag approach. A pre_save/post_save signal pair detects price/currency changes without extra DB queries, and convert_prices() uses the flag to determine which purchases need conversion. - Add needs_price_update BooleanField with db_index - Add pre_save signal to store old price/currency values - Add post_save signal to set needs_price_update=True when price/currency changes - Simplify Purchase.save() to remove DB reload + comparison logic - Remove price_or_currency_differ_from() method - Update convert_prices() to filter on needs_price_update flag - Extract _get_exchange_rate() and _save_converted_price() helpers - Add tests for the new behavior
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%