forked from IABTechLab/fideslang
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
bugSomething isn't workingSomething isn't working
Description
From fideslang created by allisonking: IABTechLab#98
Bug Description
Creating at least one privacy declaration without a name causes validation errors
Steps to Reproduce
In a python repl...
>>> from fideslang import System, PrivacyDeclaration
>>> p = PrivacyDeclaration(data_categories=[], data_use="test", data_subjects=[])
>>> p2 = PrivacyDeclaration(data_categories=[], data_use="test", data_subjects=[])
>>> s = System(fides_key="s", system_type="s" privacy_declarations=[p, p2])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "pydantic/main.py", line 331, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 1 validation error for System
privacy_declarations
'<' not supported between instances of 'NoneType' and 'NoneType' (type=type_error)
Doing just one privacy declaration works okay, perhaps because this sort doesn't need to compare
Expected behavior
Be able to make multiple privacy declarations without names without problems
Screenshots
If applicable, add screenshots to help explain your problem.
Environment
- Version:
- OS:
- Python Version:
- Docker Version:
Additional context
There's a number of ways we could fix this, considering name is being deprecated:
- Remove the sort
- Sort on
data_useinstead - Default
nameto""
I'm not sure what the best way is, open to suggestions!
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working