@@ -82,7 +82,7 @@ def edit_position(request, name):
8282 raise Http404 ()
8383 ad = get_object_or_404 (IESGLogin , login_name = ad_username )
8484
85- doc . latest_event ( BallotPosition , type = 'changed_ballot_position' , ad = ad )
85+ pos , discuss , comment = get_ballot_info ( doc . idinternal . ballot , ad )
8686
8787 if request .method == 'POST' :
8888 form = EditPositionForm (request .POST )
@@ -201,7 +201,8 @@ class EditPositionFormREDESIGN(forms.Form):
201201def edit_positionREDESIGN (request , name ):
202202 """Vote and edit discuss and comment on Internet Draft as Area Director."""
203203 doc = get_object_or_404 (Document , docalias__name = name )
204- if not doc .iesg_state :
204+ started_process = doc .latest_event (type = "started_iesg_process" )
205+ if not doc .iesg_state or not started_process :
205206 raise Http404 ()
206207
207208 ad = login = request .user .get_profile ().email ()
@@ -218,7 +219,7 @@ def edit_positionREDESIGN(request, name):
218219 raise Http404 ()
219220 ad = get_object_or_404 (Email , pk = ad_id )
220221
221- old_pos = doc .latest_event (BallotPosition , type = "changed_ballot_position" , ad = ad )
222+ old_pos = doc .latest_event (BallotPosition , type = "changed_ballot_position" , ad = ad , time__gte = started_process . time )
222223
223224 if request .method == 'POST' :
224225 form = EditPositionForm (request .POST )
@@ -394,6 +395,9 @@ def send_ballot_comment(request, name):
394395def send_ballot_commentREDESIGN (request , name ):
395396 """Email Internet Draft ballot discuss/comment for area director."""
396397 doc = get_object_or_404 (Document , docalias__name = name )
398+ started_process = doc .latest_event (type = "started_iesg_process" )
399+ if not started_process :
400+ raise Http404 ()
397401
398402 ad = login = request .user .get_profile ().email ()
399403
@@ -413,7 +417,7 @@ def send_ballot_commentREDESIGN(request, name):
413417 raise Http404 ()
414418 ad = get_object_or_404 (Email , pk = ad_id )
415419
416- pos = doc .latest_event (BallotPosition , type = "changed_ballot_position" , ad = ad )
420+ pos = doc .latest_event (BallotPosition , type = "changed_ballot_position" , ad = ad , time__gte = started_process . time )
417421 if not pos :
418422 raise Http404 ()
419423
0 commit comments