Fix review counts when deleting repositories.

Review Request #5343 — Created Jan. 28, 2014 and submitted

Information

Review Board
master

Reviewers

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.

Description From Last Updated

Can just take *args, **kwargs and pass that in instead, so we never have to worry about them changing arguments.

chipx86chipx86

""" on the next line.

chipx86chipx86
chipx86
  1. We can't listen to the deletion signal for the model? I assumed we'd get that any time we'd also get a log_deletion.

  2. reviewboard/scmtools/admin.py (Diff revision 1)
     
     
    Show all issues

    Can just take *args, **kwargs and pass that in instead, so we never have to worry about them changing arguments.

  3. reviewboard/scmtools/admin.py (Diff revision 1)
     
     
    Show all issues

    """ on the next line.

  4. 
      
david
chipx86
  1. Ship It!
  2. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (428b29f).
Loading...