Skip to content

Commit

Permalink
turned off strict checking for the registry id
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasLaPiana committed Nov 28, 2023
1 parent 9ec615a commit 43abfb7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/fideslang/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1098,6 +1098,7 @@ class System(FidesModel):
registry_id: Optional[int] = Field(
default=None,
description="The id of the system registry, if used.",
strict=False, # This allows Pydantic to coerce '1' -> 1
)
meta: Optional[Dict] = meta_field
fidesctl_meta: Optional[SystemMetadata] = Field(
Expand Down Expand Up @@ -1149,7 +1150,7 @@ class System(FidesModel):
description="If specified, the unique identifier for the vendor that was previously associated with this system.",
)
dataset_references: Optional[List[FidesKey]] = Field(
default=None,
default=[],
description="Referenced Dataset fides keys used by the system.",
)
processes_personal_data: bool = Field(
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def resources_dict():
),
"system": models.System(
organization_fides_key="1",
registryId="1",
registry_id="1",
fides_key="test_system",
system_type="SYSTEM",
name="Test System",
Expand Down
7 changes: 3 additions & 4 deletions tests/fideslang/test_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,6 @@ def test_valid_policy():
organization_fides_key="1",
fides_key="test_policy",
name="Test Policy",
version="1.3",
description="Test Policy",
rules=[],
)
Expand All @@ -415,7 +414,7 @@ def test_valid_policy():
def test_create_valid_system():
System(
organization_fides_key="1",
registryId="1",
registry_id=1,
fides_key="test_system",
system_type="SYSTEM",
name="Test System",
Expand Down Expand Up @@ -446,7 +445,7 @@ def test_invalid_country_identifier(country_code: str):
with pytest.raises(ValidationError):
System(
organization_fides_key="1",
registryId="1",
registry_id="1",
fides_key="test_system",
system_type="SYSTEM",
name="Test System",
Expand All @@ -471,7 +470,7 @@ def test_valid_country_identifier(country_code: str):
"""Validates usage of alpha-3 codes per ISO 3166"""
System(
organization_fides_key="1",
registryId="1",
registry_id="1",
fides_key="test_system",
system_type="SYSTEM",
name="Test System",
Expand Down

0 comments on commit 43abfb7

Please sign in to comment.