From 23f38e2ebca9e0cc866606e20e29f649dab2c7c7 Mon Sep 17 00:00:00 2001 From: Jennifer Richards Date: Fri, 27 Jan 2023 14:01:22 -0400 Subject: [PATCH] fix: Fix broken add/modify ADs in the secr app (#5040) --- ietf/secr/areas/views.py | 4 +++- ietf/secr/templates/areas/people.html | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ietf/secr/areas/views.py b/ietf/secr/areas/views.py index 93e438cf8..9d016699c 100644 --- a/ietf/secr/areas/views.py +++ b/ietf/secr/areas/views.py @@ -1,7 +1,7 @@ import json from django.contrib import messages -from django.http import HttpResponse +from django.http import HttpResponse, HttpResponseBadRequest from django.shortcuts import render, get_object_or_404, redirect from ietf.group.models import Group, GroupEvent, Role @@ -110,6 +110,8 @@ def people(request, name): messages.success(request, 'New Area Director added successfully!') return redirect('ietf.secr.areas.views.view', name=name) + else: + return HttpResponseBadRequest('Invalid action') else: form = AreaDirectorForm() diff --git a/ietf/secr/templates/areas/people.html b/ietf/secr/templates/areas/people.html index 7eeb77c59..8f9b18436 100644 --- a/ietf/secr/templates/areas/people.html +++ b/ietf/secr/templates/areas/people.html @@ -27,9 +27,9 @@ {% if director.name.slug == "ad" %} Voting Enabled {% else %} - + {% endif %} - + {% endfor %} @@ -45,7 +45,7 @@ {{ form.as_table }} - +