2
0
Fork 0

Only add 'Anmelden' item to nav if user is not authenticated

This commit is contained in:
Luca 2023-05-05 20:26:53 +02:00
parent 77bbca4d37
commit d4fdc952aa
1 changed files with 3 additions and 0 deletions

View File

@ -45,6 +45,9 @@ def populate_app_nav(sender, **kwargs):
request = sender request = sender
nav_items = [] nav_items = []
if request.user.is_authenticated:
return nav_items
helper = request.helper helper = request.helper
if helper is None: if helper is None:
nav_items.append({"link": reverse("register"), "text": "Anmelden"}) nav_items.append({"link": reverse("register"), "text": "Anmelden"})