From 5435cd28c9de8b3a45393d6fd9f09b5ffe8d274e Mon Sep 17 00:00:00 2001 From: Matthias Date: Wed, 4 May 2022 12:39:56 +0200 Subject: [PATCH] redirect to index if company was deleted --- InvenTree/company/templates/company/manufacturer_part.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/InvenTree/company/templates/company/manufacturer_part.html b/InvenTree/company/templates/company/manufacturer_part.html index e3bcb3dd7e..5a0e741c1a 100644 --- a/InvenTree/company/templates/company/manufacturer_part.html +++ b/InvenTree/company/templates/company/manufacturer_part.html @@ -338,6 +338,8 @@ $('#delete-part').click(function() { onSuccess: function() { {% if part.manufacturer %} window.location.href = "{% url 'company-detail' part.manufacturer.id %}"; + {% else%} + window.location.href = "{% url 'index' %}"; {% endif %} } });