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

Adding delete function for Attachment Cursors #113

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jezawa
Copy link

@jezawa jezawa commented Oct 22, 2020

Adds the ability to delete an attachment from an attachment field

Copy link
Contributor

@dmikov dmikov left a comment

Choose a reason for hiding this comment

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

Unit tests missing

@@ -34,6 +34,24 @@ def add(self, filename, stream, content_type=None):

return attachment

def delete(self, attachment):
Copy link
Contributor

Choose a reason for hiding this comment

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

Since there is not issue linked or jira ticket, can some information be added to the PR about why and example usage?
Will there be unit tests for this functionality?

Choose a reason for hiding this comment

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

This is an important functionality to add.

  1. The main use case I can think of is if you are syncing records between instances / applications and a parent record attachments have been deleted, you would want it to replicate in the child record(s).
  2. Another use case could be for record ingestion. For example, if you are ingesting an email which has attachments and a record is created but you still have yet to parse that data, if the record has attachments, but you only want attachments of a particular type, then deleting it when parsing the record would be beneficial.

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.

4 participants