Skip to content

Commit

Permalink
revert meta field back to optional, default to None (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamsachs authored Jun 7, 2023
1 parent affd3b4 commit 77cb579
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/fideslang/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
description="Denotes whether the resource is part of the default taxonomy or not.",
)
meta_field = Field(
default_factory=dict,
default=None,
description="An optional property to store any extra information for a resource. Data can be structured in any way: simple set of `key: value` pairs or deeply nested objects.",
)

Expand Down Expand Up @@ -534,7 +534,7 @@ class DatasetMetadata(BaseModel):
class Dataset(FidesModel, FidesopsMetaBackwardsCompat):
"""The Dataset resource model."""

meta: Dict = meta_field
meta: Optional[Dict] = meta_field
data_categories: Optional[List[FidesKey]] = Field(
description="Array of Data Category resources identified by `fides_key`, that apply to all collections in the Dataset.",
)
Expand Down Expand Up @@ -925,7 +925,7 @@ class System(FidesModel):
registry_id: Optional[int] = Field(
description="The id of the system registry, if used.",
)
meta: Dict = meta_field
meta: Optional[Dict] = meta_field
fidesctl_meta: Optional[SystemMetadata] = Field(
description=SystemMetadata.__doc__,
)
Expand Down
2 changes: 1 addition & 1 deletion tests/fideslang/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def test_system_valid_no_meta(self) -> None:
system_type="SYSTEM",
tags=["some", "tags"],
)
assert system.meta == {}
assert system.meta == None

def test_system_valid_no_egress_or_ingress(self) -> None:
assert System(
Expand Down

0 comments on commit 77cb579

Please sign in to comment.