• 
      

    Add the soon-to-be-mandatory on_delete argument to ForeignKeys.

    Review Request #9667 — Created Feb. 18, 2018 and submitted

    Information

    Djblets
    release-1.0.x
    3269b1a...

    Reviewers

    ForeignKey accepts an on_delete argument that says that should
    happen when the object on the other end of the relation is deleted.
    Historically, Django has defaulted to CASCADE, which deletes the
    object on this end of the relation, but there are other options
    available.

    In order to prevent unintentional deletions, Django 2.0 requires this
    option, and Django 1.11 emits a deprecation warning if it's not set.
    This change goes through all ForeignKey fields in Djblets and sets it
    to the historical default of CASCADE.

    Unit tests on Djblets and Review Board pass for Django 1.6.

    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-1.0.x (7caae49)