-
Notifications
You must be signed in to change notification settings - Fork 0
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 save data categories nested fields #22
HJ-20 save data categories nested fields #22
Conversation
) | ||
|
||
assert field | ||
assert field.data_categories == ["user"] | ||
assert field.fields[0].data_categories == ["user"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
real test here, a nested field can in fact have a category
), | ||
fields=[DatasetField(name="nested_field")], | ||
) | ||
assert_error_message_includes( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want users to add data categories to the "non-terminal" nested fields (middle fields, or top level) then this validation needs to be removed and the reverse of this test is now the case
@@ -7,8 +7,8 @@ | |||
from .data_uses import DEFAULT_DATA_USES | |||
from .organizations import DEFAULT_ORGANIZATIONS | |||
|
|||
sort_data_types = ( | |||
lambda x: x.parent_key if hasattr(x, "parent_key") and x.parent_key else x.fides_key | |||
sort_data_types = lambda x: ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
autoformatter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for making the changes
Part of HJ-20
Description Of Changes
remove stipulation that sub fields can't have data categories
Code Changes
Steps to Confirm
Pre-Merge Checklist
CHANGELOG.md