Skip to content

Commit 1bcbd0a

Browse files
authored
support previous_vendor_id attribute on System model (#182)
* support previous_vendor_id attribute on System model * update changelog, create section for 2.2.1 release
1 parent f5ab584 commit 1bcbd0a

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

CHANGELOG.md

+9-2
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,19 @@ The types of changes are:
1414
- `Fixed` for any bug fixes.
1515
- `Security` in case of vulnerabilities.
1616

17-
## [Unreleased](https://github.com/ethyca/fideslang/compare/2.2.0...main)
17+
## [Unreleased](https://github.com/ethyca/fideslang/compare/2.2.1...main)
1818

19-
## [2.2.0](https://github.com/ethyca/fideslang/compare/2.1.0...2.2.0)
19+
## [2.2.1](https://github.com/ethyca/fideslang/compare/2.2.0...2.2.1)
2020

2121
### Added
2222

23+
- Added a `System.cookies` property to support `Cookie` records explicitly associated with a `System` generally [#181](https://github.com/ethyca/fideslang/pull/181)
24+
- Added a `System.previous_vendor_id` property to support to associate a `System` record with a "deprecated" vendor record [#182](https://github.com/ethyca/fideslang/pull/182)
25+
26+
## [2.2.0](https://github.com/ethyca/fideslang/compare/2.1.0...2.2.0)
27+
28+
### Added
29+
2330
- Added support for new TCF-based `System` fields [#173](https://github.com/ethyca/fideslang/pull/173)
2431
- Added support for `PrivacyDeclaration.flexible_legal_basis_for_profiling` field [#177](https://github.com/ethyca/fideslang/pull/177) [#178](https://github.com/ethyca/fideslang/pull/178)
2532
- Added GVL data category mapping and functions [#175](https://github.com/ethyca/fideslang/pull/175) [#180](https://github.com/ethyca/fideslang/pull/180)

src/fideslang/models.py

+3
Original file line numberDiff line numberDiff line change
@@ -1165,6 +1165,9 @@ class System(FidesModel):
11651165
vendor_id: Optional[str] = Field(
11661166
description="The unique identifier for the vendor that's associated with this system."
11671167
)
1168+
previous_vendor_id: Optional[str] = Field(
1169+
description="If specified, the unique identifier for the vendor that was previously associated with this system."
1170+
)
11681171
dataset_references: List[FidesKey] = Field(
11691172
default_factory=list,
11701173
description="Referenced Dataset fides keys used by the system.",

tests/fideslang/test_models.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ def test_privacy_declaration_data_qualifier_deprecation(self) -> None:
9292

9393

9494
class TestSystem:
95+
# TODO: these tests are not effectively evaluating whether the provided constructor args
96+
# are actually supported, because our `System` model does not prohibit "extra" fields.
97+
# We need to update these tests to assert that the provided args are actually being set
98+
# as attributes on the System instance that's instantiated.
9599
def test_system_valid(self) -> None:
96100
assert System(
97101
description="Test Policy",
@@ -390,13 +394,14 @@ def test_expanded_system(self):
390394
data_shared_with_third_parties=True,
391395
third_parties="advertising; marketing",
392396
shared_categories=[],
397+
flexible_legal_basis_for_processing=True,
393398
cookies=[
394399
{"name": "ANON_ID", "path": "/", "domain": "tribalfusion.com"}
395400
],
396401
)
397402
],
398403
third_country_transfers=["ARM"],
399-
vendor_id="1",
404+
vendor_id="gvl.1",
400405
dataset_references=["test_fides_key_dataset"],
401406
processes_personal_data=True,
402407
exempt_from_privacy_regulations=False,
@@ -419,7 +424,7 @@ def test_expanded_system(self):
419424
cookie_refresh=True,
420425
uses_non_cookie_access=True,
421426
legitimate_interest_disclosure_url="http://www.example.com/legitimate_interest_disclosure",
422-
flexible_legal_basis_for_processing=True,
427+
previous_vendor_id="gacp.10",
423428
cookies=[
424429
{
425430
"name": "COOKIE_ID_EXAMPLE",

0 commit comments

Comments
 (0)