Fix the get_email_addresses_for_group query with local_sites.

Review Request #6374 — Created Sept. 25, 2014 and submitted

Information

Review Board
release-2.0.x
a31879d...

Reviewers

Against all odds, some users actually end up trying to set up local sites. In
this case, a user was a member of a review group on a local site, which broke
the query that chooses e-mail addresses for a normal group. I've added a
conditional to only check the user's local_site access if the group in question
has a local site.

Ran unit tests.

Description From Last Updated

No need to save, since adding to a M2M relation will directly affect the database.

chipx86chipx86
reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/notifications/email.py
    
    
    
    Tool: Pyflakes
    Processed Files:
        reviewboard/notifications/email.py
    
    
  2. 
      
chipx86
  1. Looks fine, but can we get a unit test to go along with it?

  2. 
      
david
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/notifications/email.py
        reviewboard/notifications/tests.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/notifications/email.py
        reviewboard/notifications/tests.py
    
    
  2. 
      
chipx86
  1. 
      
  2. reviewboard/notifications/tests.py (Diff revision 2)
     
     
    Show all issues

    No need to save, since adding to a M2M relation will directly affect the database.

    1. That doesn't seem to be the case inside the transactions that the testcases set up. Without this, the bug didn't reproduce in the test.

    2. Weird, okay.

  3. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-2.0.x (84169d5)
Loading...