From 46684a0f7eb20597100a4af6ba19dd64ebb8bd04 Mon Sep 17 00:00:00 2001 From: augustin64 Date: Sat, 4 Mar 2023 19:48:37 +0100 Subject: [PATCH] Update register.html --- partitioncloud/__init__.py | 3 ++- partitioncloud/templates/auth/register.html | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/partitioncloud/__init__.py b/partitioncloud/__init__.py index b16bcba..fda5557 100644 --- a/partitioncloud/__init__.py +++ b/partitioncloud/__init__.py @@ -68,7 +68,8 @@ def add_user(): # Success, go to the login page. user = User(name=username) try: - user.join_album(album_uuid) + if album_uuid != "": + user.join_album(album_uuid) flash(f"Utilisateur {username} créé") return redirect("/albums") except LookupError: diff --git a/partitioncloud/templates/auth/register.html b/partitioncloud/templates/auth/register.html index 14f2e20..0efbea1 100644 --- a/partitioncloud/templates/auth/register.html +++ b/partitioncloud/templates/auth/register.html @@ -12,6 +12,8 @@ +{% if g.user.access_level == 1 %} + +{% endif %} {% endblock %} \ No newline at end of file