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

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

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.

Commits

Files

    Loading...