• 
      

    Fix counters on LocalSites for brand new review requests.

    Review Request #2629 — Created Sept. 27, 2011 and submitted — Latest diff uploaded

    Information

    Review Board
    release-1.6.x

    Reviewers

    Fix counters on LocalSites for brand new review requests.
    
    Counters on LocalSites weren't reliable for brand new review requests,
    because at the point of save(), the local_site variable wasn't even set.
    This meant that counters would get bumped on the main SiteProfile (the
    one not tied to a LocalSite), but not on the one you'd expect from a
    LocalSite. This manifested all kinds of wrong numbers on the dashboard for
    LocalSites.
    
    Fixed this by setting the local_site early. Added unit tests that
    reproduced the problem.
    Unit tests pass. The new test reproduced the exact problem I was seeing
    rather well.