revsys / django-tos

A small app to ensure your users re-agree to Terms of Service changes
BSD 3-Clause "New" or "Revised" License
153 stars 42 forks source link

Middleware: Only warn when settings.DEBUG is True #84

Closed blag closed 4 months ago

blag commented 4 months ago

As noted in #80, always raising an error when there are no active terms of service is a little overactive.

This PR adjusts when NoActiveTermsOfService is thrown, and when settings.DEBUG is True, only raises a warning instead. This should help when building containers for development.

Tests included for both settings.DEBUG states.

nicholasserra commented 4 months ago

Looks like a good solution to me, thank you!