del old task dep, page start from 1
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
from datetime import date
|
||||
|
||||
from fastapi import HTTPException
|
||||
|
||||
from src.schemas.users import User, UserUpdate, UserWithTasks
|
||||
@@ -43,7 +41,7 @@ class UserService(BaseService):
|
||||
|
||||
async def get_user_with_tasks(self, user_id: int, **attrs):
|
||||
if attrs.get("page") and attrs.get("limit"):
|
||||
tasks_offset = attrs.get("page", 0) * attrs.get("limit")
|
||||
tasks_offset = (attrs.get("page", 0) - 1) * attrs.get("limit")
|
||||
else:
|
||||
tasks_offset = None
|
||||
user = await self.session.user.get_one_with_load(
|
||||
|
||||
Reference in New Issue
Block a user