diff --git a/routes/glossary_routes.py b/routes/glossary_routes.py index 7be1734..4865fd1 100644 --- a/routes/glossary_routes.py +++ b/routes/glossary_routes.py @@ -591,6 +591,7 @@ async def import_glossary_template( glossary = Glossary( user_id=user.id, name=glossary_name, + source_language=template_data.get("source_lang", "fr"), created_at=datetime.now(timezone.utc), updated_at=datetime.now(timezone.utc), ) @@ -625,11 +626,11 @@ async def import_glossary_template( }, ) except Exception as e: - logger.error(f"Failed to import glossary template {template_id}: {e}") + logger.error(f"Failed to import glossary template {template_id}: {e}", exc_info=True) return JSONResponse( status_code=500, content={ "error": "IMPORT_ERROR", - "message": "An error occurred while importing the template.", + "message": f"Import failed: {str(e)}", }, )