agstrike / silverstrike

Finance Management Made Easy
https://silverstrike.org
MIT License
420 stars 98 forks source link

Fix error during calculation of average transaction amount of recurrences #148

Closed simhnna closed 1 year ago

simhnna commented 1 year ago

It used to throw for recurrences that have no linked transactions

Fixes: #147

codecov[bot] commented 1 year ago

Codecov Report

Base: 74.70% // Head: 82.67% // Increases project coverage by +7.97% :tada:

Coverage data is based on head (14c1339) compared to base (09f27ec). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #148 +/- ## ========================================== + Coverage 74.70% 82.67% +7.97% ========================================== Files 38 53 +15 Lines 1866 2719 +853 ========================================== + Hits 1394 2248 +854 + Misses 472 471 -1 ``` | [Impacted Files](https://codecov.io/gh/agstrike/silverstrike/pull/148?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=agstrike) | Coverage Δ | | |---|---|---| | [silverstrike/models/recurrence.py](https://codecov.io/gh/agstrike/silverstrike/pull/148/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=agstrike#diff-c2lsdmVyc3RyaWtlL21vZGVscy9yZWN1cnJlbmNlLnB5) | `85.38% <100.00%> (+0.34%)` | :arrow_up: | | [silverstrike/tests/models/test\_recurrences.py](https://codecov.io/gh/agstrike/silverstrike/pull/148/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=agstrike#diff-c2lsdmVyc3RyaWtlL3Rlc3RzL21vZGVscy90ZXN0X3JlY3VycmVuY2VzLnB5) | `100.00% <100.00%> (ø)` | | | [silverstrike/tests/models/test\_transactions.py](https://codecov.io/gh/agstrike/silverstrike/pull/148/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=agstrike#diff-c2lsdmVyc3RyaWtlL3Rlc3RzL21vZGVscy90ZXN0X3RyYW5zYWN0aW9ucy5weQ==) | `100.00% <0.00%> (ø)` | | | [...ike/tests/forms/test\_recurringtransaction\_forms.py](https://codecov.io/gh/agstrike/silverstrike/pull/148/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=agstrike#diff-c2lsdmVyc3RyaWtlL3Rlc3RzL2Zvcm1zL3Rlc3RfcmVjdXJyaW5ndHJhbnNhY3Rpb25fZm9ybXMucHk=) | `100.00% <0.00%> (ø)` | | | [silverstrike/tests/views/test\_account\_views.py](https://codecov.io/gh/agstrike/silverstrike/pull/148/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=agstrike#diff-c2lsdmVyc3RyaWtlL3Rlc3RzL3ZpZXdzL3Rlc3RfYWNjb3VudF92aWV3cy5weQ==) | `100.00% <0.00%> (ø)` | | | [silverstrike/tests/models/test\_splits.py](https://codecov.io/gh/agstrike/silverstrike/pull/148/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=agstrike#diff-c2lsdmVyc3RyaWtlL3Rlc3RzL21vZGVscy90ZXN0X3NwbGl0cy5weQ==) | `100.00% <0.00%> (ø)` | | | [...rstrike/tests/views/test\_update\_recurrence\_date.py](https://codecov.io/gh/agstrike/silverstrike/pull/148/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=agstrike#diff-c2lsdmVyc3RyaWtlL3Rlc3RzL3ZpZXdzL3Rlc3RfdXBkYXRlX3JlY3VycmVuY2VfZGF0ZS5weQ==) | `100.00% <0.00%> (ø)` | | | [silverstrike/tests/views/test\_views.py](https://codecov.io/gh/agstrike/silverstrike/pull/148/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=agstrike#diff-c2lsdmVyc3RyaWtlL3Rlc3RzL3ZpZXdzL3Rlc3Rfdmlld3MucHk=) | `100.00% <0.00%> (ø)` | | | [silverstrike/tests/models/test\_categories.py](https://codecov.io/gh/agstrike/silverstrike/pull/148/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=agstrike#diff-c2lsdmVyc3RyaWtlL3Rlc3RzL21vZGVscy90ZXN0X2NhdGVnb3JpZXMucHk=) | `100.00% <0.00%> (ø)` | | | ... and [8 more](https://codecov.io/gh/agstrike/silverstrike/pull/148/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=agstrike) | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=agstrike). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=agstrike)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.