fix(ci): fix mypy error in bulk_toggle_scholars
Use int(cursor.rowcount) instead of type: ignore comment.
This commit is contained in:
parent
6f3e0eec39
commit
3e933998a0
1 changed files with 2 additions and 2 deletions
|
|
@ -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__ = [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue