def METHOD_NAME(setting):
    """
    The weight can be None, or a decimal. In that case, normalize so
    that we don't return e.g. '15.00', but always '15', independently of
    the database used.
    """
    if setting.weight:
        weight = normalize_decimal(setting.weight)
    else:
        weight = setting.weight
    return weight