Fix a bad conditional in the Root Resource with duplicate templates.
Review Request #13648 — Created March 19, 2024 and submitted — Latest diff uploaded
In an earlier cleanup (commit b1663a23c), a number of
settings.DEBUG
checks were turned intonot settings.PRODUCTION
. However, the one in
the Root Resource that forced an error when duplicate URI templates key
were found was changed tonot 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 withDEBUG=False
.
So I've updated the check to only raise an exception when in developer
mode withDEBUG=False
, and otherwise simply log.
Unit tests pass.