Skip to content

Commit 3dd66eb

Browse files
committed
Fixed an UnboundLocalError (only partial variable initialization) bug.
- Legacy-Id: 14620
1 parent dd7853c commit 3dd66eb

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

ietf/doc/views_ballot.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ def edit_position(request, name, ballot_id):
199199
ad = get_object_or_404(Person, pk=ad_id)
200200

201201
if request.method == 'POST':
202+
old_pos = None
202203
if not has_role(request.user, "Secretariat") and not ad.role_set.filter(name="ad", group__type="area", group__state="active"):
203204
# prevent pre-ADs from voting
204205
return HttpResponseForbidden("Must be a proper Area Director in an active area to cast ballot")

0 commit comments

Comments
 (0)