python-intercom
python-intercom copied to clipboard
AttributeError when trying to perform a delete through leads Service.
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