code: def delete_object(self, obj, view_kwargs):
          
          if obj is None:
              url_field = getattr(self, 'url_field', 'id')
              filter_value = view_kwargs[url_field]
              raise ObjectNotFound('{}: {} not found'.format(self.model.__name__, filter_value),
                                   source={'parameter': url_field})
  
          self.before_delete_object(obj, view_kwargs)
  
          self.session.delete(obj)
          try:
              self.session.commit()
          except JsonApiException as e:
              self.session.rollback()
              raise e
          except Exception as e:
              self.session.rollback()
              raise JsonApiException("Delete object error: " + str(e))
  
          self.after_delete_object(obj, view_kwargs)
docs: Delete an object through sqlalchemy
  
          :param DeclarativeMeta item: an item from sqlalchemy
          :param dict view_kwargs: kwargs from the resource view