update flexible_legal_basis_for_profiling
boolean field to be optional
#178
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes n/a
Description Of Changes
as @NevilleS pointed out in the original PR just merged that added this field, we should have made the
flexible_legal_basis_for_profiling
field anOptional[bool]
field on ourPrivacyDeclaration
model.I'd thought this was a nitpick that could be ignored, but on further thought, i think this could have a legitimate functional impact! basically, for non-GVL based privacy declarations, we don't really want to specify whether or not they have a flexible legal basis. for GVL-based privacy declarations, we want to specify whether the legal basis is flexible or not.
i've tested this change with fides and the API/db layer, and things seem to work as expected. if the API request doesn't specify the field, it's left null in the db. if the API request does specify either true or false, the corresponding value gets persisted to the db 👍
Code Changes
PrivacyDeclaration.flexible_legal_basis_for_processing
model field anOptional[bool]
with no default, i.e. defaults toNone
/nullSteps to Confirm
Pre-Merge Checklist
CHANGELOG.md