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

Creating at least one privacy declaration without a name causes validation errors #98

Closed
allisonking opened this issue Feb 17, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@allisonking
Copy link
Contributor

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_use instead
  • Default name to ""

I'm not sure what the best way is, open to suggestions!

@allisonking allisonking added the bug Something isn't working label Feb 17, 2023
@NevilleS NevilleS closed this as not planned Won't fix, can't repro, duplicate, stale Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants