Skip to content

Commit 66f3115

Browse files
committed
Fixed a problem with blocking comments on charter documents pointed out by rjsparks@nostrum.com.
- Legacy-Id: 4819
1 parent 88ea94c commit 66f3115

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

ietf/idrfc/views_ballot.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def __init__(self, *args, **kwargs):
8888
def clean_discuss(self):
8989
entered_discuss = self.cleaned_data["discuss"]
9090
entered_pos = self.cleaned_data["position"]
91-
if entered_pos.slug == "discuss" and not entered_discuss:
91+
if entered_pos.blocking and not entered_discuss:
9292
raise forms.ValidationError("You must enter a non-empty discuss")
9393
return entered_discuss
9494

@@ -135,10 +135,8 @@ def edit_positionREDESIGN(request, name, ballot_id):
135135
pos.comment = clean["comment"].rstrip()
136136
pos.comment_time = old_pos.comment_time if old_pos else None
137137
pos.discuss = clean["discuss"].rstrip()
138-
if not pos.pos_id == "discuss":
138+
if not pos.pos.blocking:
139139
pos.discuss = ""
140-
# if not pos.pos.blocking:
141-
# pos.discuss = ""
142140
pos.discuss_time = old_pos.discuss_time if old_pos else None
143141

144142
changes = []
@@ -162,7 +160,7 @@ def edit_positionREDESIGN(request, name, ballot_id):
162160
pos.discuss_time = pos.time
163161
changes.append("discuss")
164162

165-
if pos.discuss:
163+
if pos.pos.blocking:
166164
e = DocEvent(doc=doc, by=login)
167165
e.by = ad # otherwise we can't see who's saying it
168166
e.type = "added_comment"
@@ -224,7 +222,7 @@ def edit_positionREDESIGN(request, name, ballot_id):
224222
old_pos=old_pos,
225223
ballot_deferred=ballot_deferred,
226224
ballot = ballot,
227-
show_discuss_text=old_pos and old_pos.pos_id=="discuss",
225+
show_discuss_text=old_pos and old_pos.pos.blocking,
228226
blocking_positions=simplejson.dumps(blocking_positions),
229227
),
230228
context_instance=RequestContext(request))
@@ -337,7 +335,7 @@ def send_ballot_commentREDESIGN(request, name, ballot_id):
337335
subj = []
338336
d = ""
339337
blocking_name = "DISCUSS"
340-
if pos.pos_id == "discuss" and pos.discuss:
338+
if pos.pos.blocking and pos.discuss:
341339
d = pos.discuss
342340
blocking_name = pos.pos.name.upper()
343341
subj.append(blocking_name)

0 commit comments

Comments
 (0)