• 
      

    Don't explode when a ChangeDescription references an invalid diff.

    Review Request #6094 — Created July 10, 2014 and submitted

    Information

    Review Board
    release-2.0.x
    d59f28e...

    Reviewers

    When a diff is deleted from the database, it doesn't remove the field from any
    ChangeDescription objects (since that's buried in a JSONField and there's no
    relation between them). This meant that if a published revision of a diff was
    deleted, rendering the ChangeDescription would explode.

    This change adds some bullet-proofing around the DiffField rendering to avoid
    doing anything if the associated diff doesn't exist.

    Ran unit tests.

    Description From Last Updated

    Blank line after this.

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

      Blank line after this.

    3. 
        
    david
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-2.0.x (915d270)