-
Notifications
You must be signed in to change notification settings - Fork 6
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
ENT-8079 - Make DSC optional based on enterprise config #190
ENT-8079 - Make DSC optional based on enterprise config #190
Conversation
81d90df
to
085850d
Compare
085850d
to
984df22
Compare
984df22
to
156bfb9
Compare
156bfb9
to
4a1b73c
Compare
@@ -121,7 +151,11 @@ def _validate(self, transaction): | |||
|
|||
Raises an exception when the transaction is missing required information | |||
""" | |||
enterprise_customer_data = self._get_enterprise_customer_data(transaction) | |||
enable_data_sharing_consent = enterprise_customer_data.get('enable_data_sharing_consent', False) | |||
for field in self.REQUIRED_METADATA_FIELDS: |
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.
[curious] I'm wondering if it'd make sense to conditionally push geag_data_share_consent
onto self.REQUIRED_METADATA_FIELDS
when enable_data_sharing_consent = True
, so that the fields listed in self.REQUIRED_METADATA_FIELDS
are truly only the required fields?
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.
The issue is related to the tests since they share they same object adding more removing into the REQUIRED_METADATA_FIELDS array in causes other tests to fail which where support to pass.
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.
Got it. I suppose the other concern is that I'm not sure we'd be able to get at the appropriate enterprise customer within a class constructor, as we are relying on a specific transaction to identify the enterprise customer. I think how you have it is reasonable.
@@ -121,7 +151,11 @@ def _validate(self, transaction): | |||
|
|||
Raises an exception when the transaction is missing required information | |||
""" | |||
enterprise_customer_data = self._get_enterprise_customer_data(transaction) | |||
enable_data_sharing_consent = enterprise_customer_data.get('enable_data_sharing_consent', False) | |||
for field in self.REQUIRED_METADATA_FIELDS: |
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.
Got it. I suppose the other concern is that I'm not sure we'd be able to get at the appropriate enterprise customer within a class constructor, as we are relying on a specific transaction to identify the enterprise customer. I think how you have it is reasonable.
Description
Describe in a couple of sentences what this PR adds
Testing instructions
Add some, if applicable
Merge checklist