Merge pull request #471 from learnhouse/fix/editor-issues

Fix UI glitchs, editor bugs
This commit is contained in:
Badr B. 2025-04-07 14:39:18 +02:00 committed by GitHub
commit bbe6f9e2c5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 1048 additions and 157 deletions

View file

@ -8,6 +8,7 @@ from src.db.courses.courses import Course, CourseRead
from src.db.collections import Collection, CollectionRead
from src.db.collections_courses import CollectionCourse
from src.db.organizations import Organization
from src.db.user_organizations import UserOrganization
from src.services.courses.courses import search_courses
T = TypeVar('T')
@ -60,6 +61,10 @@ async def search_across_org(
# Search users
users_query = (
select(User)
.join(UserOrganization, and_(
UserOrganization.user_id == User.id,
UserOrganization.org_id == org.id
))
.where(
or_(
text('LOWER("user".username) LIKE LOWER(:pattern) OR ' +