Don't assume that profiles exist in datagrid code.

Review Request #6111 — Created July 17, 2014 and submitted

Information

Review Board
release-1.7.x
5046b9a...

Reviewers

If a new user was created but the associated profile was not, loading the
dashboard would cause an error (because in 1.7.x, User.get_profile() won't
create the profile). This is already fixed in the 2.0.x series, because we've
completely replaced User.get_profile() there.

There are numerious other places where the profile is assumed to exist, but
this is the only one that we've encountered in production.

Ran unit tests.

Description From Last Updated

This isn't necessary. get_or_create will save it and then set this flag to True, so by now, it's in the …

chipx86chipx86
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/reviews/datagrids.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/reviews/datagrids.py
    
    
  2. 
      
chipx86
  1. 
      
  2. reviewboard/reviews/datagrids.py (Diff revision 1)
     
     
     
    Show all issues

    This isn't necessary. get_or_create will save it and then set this flag to True, so by now, it's in the database.

  3. 
      
david
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/reviews/datagrids.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/reviews/datagrids.py
    
    
  2. 
      
chipx86
  1. Ship It!

  2. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-1.7.x (ce2e871)
Loading...