• 
      

    Fix a bad conditional in the Root Resource with duplicate templates.

    Review Request #13648 — Created March 19, 2024 and submitted

    Information

    Djblets
    release-5.x

    Reviewers

    In an earlier cleanup (commit b1663a23c), a number of settings.DEBUG
    checks were turned into not settings.PRODUCTION. However, the one in
    the Root Resource that forced an error when duplicate URI templates key
    were found was changed to not settings.DEBUG. This would have broken
    production installs but largely gone unnoticed in development installs.

    We never want to trigger this during production, but it may be nice to
    be able to trigger this in a development environment with DEBUG=False.
    So I've updated the check to only raise an exception when in developer
    mode with DEBUG=False, and otherwise simply log.

    Unit tests pass.

    Summary ID
    Fix a bad conditional in the Root Resource with duplicate templates.
    In an earlier cleanup (commit b1663a23c), a number of `settings.DEBUG` checks were turned into `not settings.PRODUCTION`. However, the one in the Root Resource that forced an error when duplicate URI templates key were found was changed to `not settings.DEBUG`. This would have broken production installs but largely gone unnoticed in development installs. We never want to trigger this during production, but it may be nice to be able to trigger this in a development environment with `DEBUG=False`. So I've updated the check to only raise an exception when in developer mode with `DEBUG=False`, and otherwise simply log.
    5c1659051129907c2973765640b609b74ed8c1ed
    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-5.x (3e16ca5)