Skip to content

CRUD operations update the wrong object when there are deleted objects #32

Description

@perotinus

If you have any deleted Salesforce objects, the update (and probably upsert, and potentially other CRUD operations) don't work correctly. The code that checks for the index of the object that needs to be modified does not include deleted objects, but the code that updates the object at that index does include deleted objects, so the indices are mismatched.

Specifically for update:

Reproduction pseudo-code:

@mock_salesforce
def test():
  note = self.simple_salesforce.Note.create(...)
  self.simple_salesforce.Note.delete(note["id"])
  note_two = self.simple_salesforce.Note.create(...)
  self.simple_salesforce.Note.update(...)
  # At this point, note_two is unchanged;  note got the update even though it was deleted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions