feat(scholars): add multiselect and bulk actions #49

Open
JustinZeus wants to merge 7 commits from feat/scholar-multiselect-bulk-actions into main
Showing only changes of commit d1d0abeb11 - Show all commits

View file

@ -65,7 +65,7 @@ async def bulk_toggle_scholars(
) -> int: ) -> int:
from sqlalchemy import update from sqlalchemy import update
result = await db_session.execute( cursor = await db_session.execute(
update(ScholarProfile) update(ScholarProfile)
.where( .where(
ScholarProfile.id.in_(scholar_profile_ids), ScholarProfile.id.in_(scholar_profile_ids),
@ -74,7 +74,7 @@ async def bulk_toggle_scholars(
.values(is_enabled=is_enabled) .values(is_enabled=is_enabled)
) )
await db_session.commit() await db_session.commit()
return result.rowcount # type: ignore[return-value] return int(cursor.rowcount)
__all__ = [ __all__ = [