From a9a2f77ccbe96d66852a73355aac9f88a250334a Mon Sep 17 00:00:00 2001 From: Dan Sikes Date: Wed, 1 Mar 2023 16:53:00 -0500 Subject: [PATCH] adding dataclass to record model --- pocketbase/models/record.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pocketbase/models/record.py b/pocketbase/models/record.py index 78ba51b..835d548 100644 --- a/pocketbase/models/record.py +++ b/pocketbase/models/record.py @@ -2,12 +2,13 @@ from pocketbase.models.utils.base_model import BaseModel from pocketbase.utils import camel_to_snake +from dataclasses import dataclass, field - +@dataclass class Record(BaseModel): collection_id: str - collection_name: str - expand: dict + collection_name: str = "" + expand: dict = field(default_factory=dict) def load(self, data: dict) -> None: super().load(data)