'Raise error if HDA is still uploading.'

def error_if_uploading(self, hda):

    if (hda.state == model.Dataset.states.UPLOAD):
        raise exceptions.Conflict('Please    wait    until    this    dataset    finishes    uploading')
    return hda
