Fix: no success url when saving changes

This commit is contained in:
Dirk Jahnke 2022-04-13 16:14:56 +02:00
parent e34b95f592
commit bb978e29ce
1 changed files with 1 additions and 1 deletions

View File

@ -23,8 +23,8 @@ class ContainerListView(LoginRequiredMixin, generic.ListView):
class ContainerCreateView(LoginRequiredMixin, generic.CreateView): class ContainerCreateView(LoginRequiredMixin, generic.CreateView):
model = Container model = Container
# template_name = 'container/detail.html'
fields = ['named_id', 'description', 'color', 'container_type'] fields = ['named_id', 'description', 'color', 'container_type']
success_url = '/container/'
def form_valid(self, form): def form_valid(self, form):
if not form.instance.named_id.startswith('C-'): if not form.instance.named_id.startswith('C-'):