Minor bugs when creating a system
This commit is contained in:
@@ -33,7 +33,7 @@ class SystemDbController():
|
||||
try:
|
||||
# Check if the data to be inserted has an ID
|
||||
if not system_data.get("_id"):
|
||||
system_data['_id'] = uuid4()
|
||||
system_data['_id'] = str(uuid4())
|
||||
|
||||
inserted_result = None
|
||||
inserted_id = None
|
||||
|
||||
@@ -38,7 +38,7 @@ async def create_system_route():
|
||||
|
||||
if created_system:
|
||||
print("Created new system:", created_system)
|
||||
return jsonify(created_system), 201
|
||||
return jsonify(created_system.to_dict()), 201
|
||||
else:
|
||||
abort(500, "Failed to create system in the database.")
|
||||
except HTTPException:
|
||||
|
||||
Reference in New Issue
Block a user