def model_tag(model):

    """
    Return the model identifier tag used for auditlog actions

    Will prefer a handlerf tag if it exists, otherwise a lowercase
    version of the model name will be returned.
    """

    try:
        return model.HandleRef.tag
    except AttributeError:
        return model.__name__.lower()