user_profile may be emtpy on post
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user