use api in front
This commit is contained in:
@@ -60,6 +60,8 @@ def create_submission(
|
||||
if len(files) < len(data.responses):
|
||||
return 400, {"detail": "Not enough files for all responses"}
|
||||
|
||||
print(data, files)
|
||||
|
||||
try:
|
||||
with transaction.atomic():
|
||||
# Create the submission
|
||||
@@ -135,6 +137,7 @@ def create_submission(
|
||||
return submission
|
||||
|
||||
except Exception as e:
|
||||
print(e)
|
||||
return 500, {"detail": f"Error creating submission: {str(e)}"}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user