From c0afb2050354296731a759d7957827792b9ff20d Mon Sep 17 00:00:00 2001 From: Dan Sikes Date: Sun, 9 Apr 2023 12:39:09 -0400 Subject: [PATCH] adding dataclass to record model (#33) Co-authored-by: Dan Sikes --- 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)