Fix review counts when deleting repositories.
Review Request #5343 — Created Jan. 28, 2014 and submitted — Latest diff uploaded
Fix review counts when deleting repositories.
Removing repositories through the admin UI was hopefully the last place that
could leave the review counts out of date. Unfortunately, there's no good way
to get signalled when doing cascaded delete operations, because it's handled
entirely by the SQL server.This change overrides
ModelAdmin.log_deletion
to fix up the review counts after
deleting one or more repositories.
Removed repositories that had review requests both using the individual and
bulk delete operations. Reloaded my dashboard and saw that the review counts
were correct.