feat: enhance SQL query handling and UI components for exercise management
- Introduced a new utility function to streamline SQL query construction for active status filtering, improving code reusability across multiple endpoints. - Updated existing query logic in the catalogs and skills routers to utilize the new utility function, ensuring consistent handling of active status. - Refactored the ExerciseFormPage to remove deprecated age group handling, simplifying the form structure. - Enhanced the RichTextEditor component with improved link handling and formatting options for better user experience. - Updated API utility functions to support new AI features for exercise suggestions and regeneration, expanding the capabilities of the exercise management system.
This commit is contained in:
1 parent
d8f439a3e5
commit
0ad096e483
7 files changed
+129
-84
No files matched your search
@@ -53,11 +53,14 @@ def list_skills(
|
||||
params.append(category)
|
||||
|
||||
if status:
|
||||
where.append("status = %s")
|
||||
params.append(status)
|
||||
if status == "active":
|
||||
where.append("(status = 'active' OR status IS NULL)")
|
||||
else:
|
||||
where.append("status = %s")
|
||||
params.append(status)
|
||||
else:
|
||||
# Default: only active skills
|
||||
where.append("status = 'active'")
|
||||
# Default: nur aktive (NULL = Legacy, wie Kataloglisten)
|
||||
where.append("(status = 'active' OR status IS NULL)")
|
||||
|
||||
if where:
|
||||
query += " WHERE " + " AND ".join(where)
|
||||
|
||||
Reference in new issue
Block a user