def METHOD_NAME(queryset, objconf, version) -> ConfigLog:
    if version == "previous":
        ver = objconf.previous
    elif version == "current":
        ver = objconf.current
    else:
        ver = version
    try:
        config_log = queryset.get(obj_ref=objconf, id=ver)
    except ConfigLog.DoesNotExist:
        raise AdcmEx("CONFIG_NOT_FOUND") from None
    return config_log