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

clean empty datetime fields in fallback sink #25

Merged
merged 1 commit into from
Oct 23, 2024
Merged

clean empty datetime fields in fallback sink #25

merged 1 commit into from
Oct 23, 2024

Conversation

keyn4
Copy link
Contributor

@keyn4 keyn4 commented Oct 22, 2024

No description provided.

@@ -882,6 +882,13 @@ def preprocess_record(self, record, context):
except MissingObjectInSalesforceError:
self.logger.info("Skipping record, because it was not found on Salesforce.")
return {}

# keep only available fields and that are creatable or updatable
record = {k:v for k,v in record.items() if fields.get(k) and (fields[k]["createable"] or fields[k]["updateable"])}
Copy link
Member

Choose a reason for hiding this comment

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

If it's a boolean and it's False will this still work?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

all values inside fields are dicts and both both createable and updateable are boolean values, so I think it should work if the field is either createable or updateable

@hsyyid hsyyid merged commit 9c210b9 into main Oct 23, 2024
0 of 5 checks passed
@hsyyid hsyyid deleted the hgi-6668 branch October 23, 2024 14:51
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.

2 participants