def METHOD_NAME(self, assetstore, **kwargs):
    """
    Delete an assetstore. If there are any files within this assetstore,
    a validation exception is raised.
    :param assetstore: The assetstore document to delete.
    :type assetstore: dict
    """
    from .file import File
    files = File().findOne({'assetstoreId': assetstore['_id']})
    if files is not None:
        raise ValidationException('You may not delete an assetstore that contains files.')
    # delete partial uploads before we delete the store.
    try:
        adapter = assetstore_utilities.getAssetstoreAdapter(assetstore)
        adapter.untrackedUploads([], delete=True)
    except (NoAssetstoreAdapter, ValidationException):
        # this assetstore is currently unreachable, so skip this step
        pass
    # now remove the assetstore
    super().METHOD_NAME(assetstore)
    # If after removal there is no current assetstore, then pick a
    # different assetstore to be the current one.
    current = self.findOne({'current': True})
    if current is None:
        first = self.findOne(sort=[('created', SortDir.DESCENDING)])
        if first is not None:
            first['current'] = True
            self.save(first)