Skip to content

Conversation

@adamsachs
Copy link
Contributor

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 an Optional[bool] field on our PrivacyDeclaration 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

  • make the PrivacyDeclaration.flexible_legal_basis_for_processing model field an Optional[bool] with no default, i.e. defaults to None/null

Steps to Confirm

  • tested fides API/db integration by using the fideslang alpha package based on this branch

Pre-Merge Checklist

  • All CI Pipelines Succeeded
  • Documentation Updated
  • Issue Requirements are Met
  • Relevant Follow-Up Issues Created
  • Update CHANGELOG.md

@adamsachs adamsachs marked this pull request as ready for review October 11, 2023 16:27
Copy link
Contributor

@pattisdr pattisdr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense! Nice to catch this now

@adamsachs adamsachs merged commit 499e96b into main Oct 11, 2023
@adamsachs adamsachs deleted the asachs/update-flexible-legal-basis-optional branch October 11, 2023 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants