Skip to content

Commit

Permalink
misc: Remove custom serialiastion logicgit add . This is pretty bad a…
Browse files Browse the repository at this point in the history
…nd we should follow convention where possible
  • Loading branch information
Jim-Encord committed Dec 5, 2024
1 parent 81c1359 commit 9ef2f56
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions encord/orm/filter_preset.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ class FilterPreset(BaseDTO):


class GetProjectFilterPresetParams(BaseDTO):
preset_uuids: Optional[List[uuid.UUID]] = Field(default=[], alias="uuids")
page_token: Optional[str] = Field(default=None, alias="pageToken")
page_size: Optional[int] = Field(default=None, alias="pageSize")
preset_uuids: Optional[List[uuid.UUID]] = Field(default=[])
page_token: Optional[str] = Field(default=None)
page_size: Optional[int] = Field(default=None)


class ProjectFilterPreset(BaseDTO):
preset_uuid: uuid.UUID = Field(alias="presetUuid")
name: str
created_at: Optional[datetime] = Field(default=None, alias="createdAt")
updated_at: Optional[datetime] = Field(default=None, alias="updatedAt")
created_at: Optional[datetime] = Field(default=None)
updated_at: Optional[datetime] = Field(default=None)


class FilterDefinition(BaseDTO):
Expand All @@ -40,9 +40,9 @@ class FilterDefinition(BaseDTO):

class FilterPresetDefinition(BaseDTO):
local_filters: Dict[str, FilterDefinition] = Field(
default_factory=lambda: {str(uuid.UUID(int=0)): FilterDefinition()}, alias="localFilters"
default_factory=lambda: {str(uuid.UUID(int=0)): FilterDefinition()},
)
global_filters: FilterDefinition = Field(default_factory=FilterDefinition, alias="globalFilters")
global_filters: FilterDefinition = Field(default_factory=FilterDefinition)


class GetPresetsResponse(BaseDTO):
Expand Down

0 comments on commit 9ef2f56

Please sign in to comment.