fix
This commit is contained in:
parent
880e3c8fec
commit
6748b97367
|
|
@ -4,7 +4,7 @@ from sqlalchemy.ext.asyncio import AsyncSession
|
|||
from sqlalchemy import select
|
||||
from typing import Optional
|
||||
|
||||
from hubgw.models.user import User
|
||||
from hubgw.models.users import User
|
||||
|
||||
|
||||
class UserRepository:
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
|
||||
from hubgw.repositories.user_repo import UserRepository
|
||||
from hubgw.schemas.user import GetUserGameIdResponse
|
||||
from hubgw.repositories.users_repo import UserRepository
|
||||
from hubgw.schemas.users import GetUserGameIdResponse
|
||||
from hubgw.core.errors import NotFoundError
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,25 +0,0 @@
|
|||
"""UUID utility functions."""
|
||||
|
||||
import uuid
|
||||
from typing import Union
|
||||
|
||||
|
||||
def generate_uuid() -> str:
|
||||
"""Generate a new UUID string."""
|
||||
return str(uuid.uuid4())
|
||||
|
||||
|
||||
def is_valid_uuid(uuid_string: str) -> bool:
|
||||
"""Check if string is a valid UUID."""
|
||||
try:
|
||||
uuid.UUID(uuid_string)
|
||||
return True
|
||||
except ValueError:
|
||||
return False
|
||||
|
||||
|
||||
def parse_uuid(uuid_string: Union[str, uuid.UUID]) -> uuid.UUID:
|
||||
"""Parse UUID from string or return UUID object."""
|
||||
if isinstance(uuid_string, uuid.UUID):
|
||||
return uuid_string
|
||||
return uuid.UUID(uuid_string)
|
||||
Loading…
Reference in New Issue