Improve the frontend 2
This commit is contained in:
@@ -102,7 +102,7 @@ async def create_quality_template(
|
||||
|
||||
# Add created_by from current user
|
||||
template_dict = template_data.dict()
|
||||
template_dict['created_by'] = UUID(current_user["sub"])
|
||||
template_dict['created_by'] = UUID(current_user["user_id"])
|
||||
template_create = QualityCheckTemplateCreate(**template_dict)
|
||||
|
||||
# Create template via service (handles validation and business rules)
|
||||
@@ -111,6 +111,9 @@ async def create_quality_template(
|
||||
template_data=template_create
|
||||
)
|
||||
|
||||
# Commit the transaction to persist changes
|
||||
await db.commit()
|
||||
|
||||
logger.info("Created quality template",
|
||||
template_id=str(template.id),
|
||||
template_name=template.name,
|
||||
@@ -202,6 +205,9 @@ async def update_quality_template(
|
||||
detail="Quality template not found"
|
||||
)
|
||||
|
||||
# Commit the transaction to persist changes
|
||||
await db.commit()
|
||||
|
||||
logger.info("Updated quality template",
|
||||
template_id=str(template_id),
|
||||
tenant_id=str(tenant_id))
|
||||
@@ -259,6 +265,9 @@ async def delete_quality_template(
|
||||
detail="Quality template not found"
|
||||
)
|
||||
|
||||
# Commit the transaction to persist changes
|
||||
await db.commit()
|
||||
|
||||
logger.info("Deleted quality template",
|
||||
template_id=str(template_id),
|
||||
tenant_id=str(tenant_id))
|
||||
|
||||
Reference in New Issue
Block a user