pocketbase icon indicating copy to clipboard operation
pocketbase copied to clipboard

`items` attribute from collection.get_list() should be `list[Record]`, not `list[Basemodel]`

Open TomTom101 opened this issue 1 year ago • 1 comments

@dataclass
class ListResult:
    page: int = 1
    per_page: int = 0
    total_items: int = 0
    total_pages: int = 0
    items: list[BaseModel] = field(default_factory=list)

Would items contain anything other than Records?

TomTom101 avatar Nov 26 '24 12:11 TomTom101

@TomTom101 you're right. the lib needs a refactoring regarding type annotations, you are welcome to contribute!

vaphes avatar Dec 05 '24 15:12 vaphes