From d1abb0d1f59bca1e4db9356a89e876a2fe2de550 Mon Sep 17 00:00:00 2001 From: Holger Sielaff Date: Thu, 25 Sep 2025 08:51:14 +0200 Subject: [PATCH] user_profile may be emtpy on post --- frontend/views.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/views.py b/frontend/views.py index cd35022..38124a7 100644 --- a/frontend/views.py +++ b/frontend/views.py @@ -1,4 +1,5 @@ import json +import logging import threading from django.contrib import messages @@ -358,7 +359,11 @@ def delete_container(request, container_id): @csrf_exempt def create_container(request): - user_profile = request.user.profile + try: + user_profile = request.user.profile + except AttributeError as e: + logging.error(f"{e}") + user_profile = None if request.method == 'POST': # Get task_uuid from form