Don't show debug notification if not in debug mode
This commit is contained in:
parent
f5adc0064e
commit
d9d02a241b
|
@ -114,11 +114,12 @@ def register(request):
|
|||
messages.INFO,
|
||||
f"Du hast einen Login-Link an deine Telefonnummer erhalten. Falls du die SMS nicht erhalten hast, probiere es in 15 Minuten noch ein mal.",
|
||||
)
|
||||
messages.add_message(
|
||||
request,
|
||||
messages.INFO,
|
||||
f"DEBUG:{token.get_absolute_url()}",
|
||||
)
|
||||
if settings.DEBUG:
|
||||
messages.add_message(
|
||||
request,
|
||||
messages.INFO,
|
||||
f"DEBUG:{token.get_absolute_url()}",
|
||||
)
|
||||
if token.sent_at < (
|
||||
timezone.now()
|
||||
- datetime.timedelta(minutes=math.pow(10, token.send_count))
|
||||
|
|
Loading…
Reference in New Issue