|
|
@ -29,7 +29,7 @@ def list_all_courses(): |
|
|
|
if category_uuid is not None: |
|
|
|
if category_uuid is not None: |
|
|
|
category_uuid: uuid.UUID = uuid.UUID(request.args.get('category_uuid')) |
|
|
|
category_uuid: uuid.UUID = uuid.UUID(request.args.get('category_uuid')) |
|
|
|
# Build the query as required |
|
|
|
# Build the query as required |
|
|
|
query: select = select(Course).where(in_) |
|
|
|
query: select = select(Course) |
|
|
|
if search_q != '': |
|
|
|
if search_q != '': |
|
|
|
query = query.where(or_(Course.name.like(f'%{search_q}%'), Course.description.like(f'%{search_q}%'), |
|
|
|
query = query.where(or_(Course.name.like(f'%{search_q}%'), Course.description.like(f'%{search_q}%'), |
|
|
|
User.firstName.like(f'%{search_q}%'))) |
|
|
|
User.firstName.like(f'%{search_q}%'))) |
|
|
|