Closed mthxx closed 8 years ago
It appears the issue resides somewhere in data.py -> def update_aggregates.
When a category is deleted, all of it's entries are properly updated in the database in the transactions table. Despite the function update_aggregates being run, the totals are in fact not being updated properly. The deleted category remains in the aggregates table with values, and the uncategorized aggregates remain at zero.
Interestingly though, if a second category is deleted, the uncategorized aggregates fields do finally get updated but only with the aggregates of the previous category. It continues to ignore the most recently deleted category. Additionally, the aggregates table retains entries for the deleted category's, which might cause problems when new categories are added and assume the deleted categories ID.
Nearly complete. Only thing remaining is removing values (and row) of deleted category from the overview tab. Then additional testing to determine if there are any other edge cases needing to be addressed.
If you delete a category that has entries assigned to it, the entries get re-assigned to their appropriate "uncategorized" bucket. However, while these entries are correctly handled in the database, the transactions page does not automatically refresh itself with the appropriate changes. The changes are not reflected until the application is restarted, and all data is refreshed.