Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HJ-20 remove requirement in fides and fideslang to not have datacategories on subfields #5434

Merged
merged 7 commits into from
Nov 7, 2024
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ types-defusedxml==0.7.0.20240218
expandvars==0.9.0
fastapi[all]==0.111.0
fastapi-pagination[sqlalchemy]==0.12.25
fideslang==3.0.7
fideslog==1.2.10
firebase-admin==5.3.0
GitPython==3.1.41
Expand Down Expand Up @@ -71,3 +70,4 @@ twilio==7.15.0
typing-extensions==4.12.2
validators==0.20.0
versioneer==0.19
fideslang @ git+https://github.com/ethyca/fideslang@e290bfb320ef8e6637ab011848b48f629cf42b1e
16 changes: 0 additions & 16 deletions src/fides/api/graph/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,22 +338,6 @@ class ObjectField(Field):

fields: Dict[str, Field]

@field_validator("data_categories")
@classmethod
def validate_data_categories(
cls, value: Optional[List[FidesKey]]
) -> Optional[List[FidesKey]]:
"""To prevent mismatches between data categories on an ObjectField and a nested ScalarField, only
allow data categories to be defined on the individual fields.

This shouldn't be hit unless an ObjectField is declared directly.
"""
if value:
raise ValueError(
"ObjectFields cannot be given data_categories; annotate the sub-fields instead."
)
return value

def cast(self, value: Dict[str, Any]) -> Optional[Dict[str, Any]]:
"""Cast the input value into the form represented by data_type."""

Expand Down
Loading