@permission_required("core.manage_shop")
def manage_customer_taxes(request):
    """Dispatches to the first customer_tax or to the add customer_tax form.
    """
    try:
        customer_tax = CustomerTax.objects.all()[0]
        url = reverse("lfs_manage_customer_tax", kwargs={"id": customer_tax.id})
    except __HOLE__:
        url = reverse("lfs_manage_no_customer_taxes")

    return HttpResponseRedirect(url)
dataset/ETHPy150Open diefenbach/django-lfs/lfs/manage/customer_tax/views.py/manage_customer_taxes