python-intercom icon indicating copy to clipboard operation
python-intercom copied to clipboard

AttributeError when trying to perform a delete through leads Service.

Open aleonsan opened this issue 6 years ago • 0 comments

Intercom Client leads service offers the mixin Delete to delete Lead objects. But, however this mixin is builtin to work though object attribute id .

class Delete(object):
    """A mixin that provides `delete` functionality."""

    def delete(self, obj):
        """Delete the specified instance of this resource."""
        collection = utils.resource_class_to_collection_name(
            self.collection_class)
        self.client.delete("/%s/%s" % (collection, obj.id), {})
        return obj

and Lead is an id-less object.

Update: Seen fix in https://github.com/intercom/python-intercom/pull/176

aleonsan avatar May 29 '18 16:05 aleonsan