5151import debug # pyflakes:ignore
5252
5353from ietf .doc .models import ( Document , DocHistory , DocAlias , State ,
54- LastCallDocEvent , NewRevisionDocEvent , IESG_SUBSTATE_TAGS , IESG_BALLOT_ACTIVE_STATES )
54+ LastCallDocEvent , NewRevisionDocEvent , IESG_SUBSTATE_TAGS ,
55+ IESG_BALLOT_ACTIVE_STATES , IESG_STATCHG_CONFLREV_ACTIVE_STATES ,
56+ IESG_CHARTER_ACTIVE_STATES )
5557from ietf .doc .fields import select2_id_doc_name_json
5658from ietf .doc .utils import get_search_cache_key , augment_events_with_revision
5759from ietf .group .models import Group
@@ -420,9 +422,9 @@ def docs_for_ad(request, name):
420422 possible_docs = Document .objects .filter (Q (states__type = "draft-iesg" ,
421423 states__slug__in = IESG_BALLOT_ACTIVE_STATES ) |
422424 Q (states__type = "charter" ,
423- states__slug__in = ( "intrev" , "iesgrev" ) ) |
425+ states__slug__in = IESG_CHARTER_ACTIVE_STATES ) |
424426 Q (states__type__in = ("statchg" , "conflrev" ),
425- states__slug__in = ( "iesgeval" , "defer" ) ),
427+ states__slug__in = IESG_STATCHG_CONFLREV_ACTIVE_STATES ),
426428 docevent__ballotpositiondocevent__pos__blocking = True ,
427429 docevent__ballotpositiondocevent__balloter = ad ).distinct ()
428430 for doc in possible_docs :
@@ -431,7 +433,6 @@ def docs_for_ad(request, name):
431433 continue
432434
433435 blocking_positions = [p for p in ballot .all_positions () if p .pos .blocking ]
434-
435436 if not blocking_positions or not any ( p .balloter == ad for p in blocking_positions ):
436437 continue
437438
@@ -446,6 +447,10 @@ def docs_for_ad(request, name):
446447 if blocked_docs :
447448 blocked_docs .sort (key = lambda d : min (p .time for p in d .blocking_positions if p .balloter == ad ), reverse = True )
448449
450+ for d in blocked_docs :
451+ if d .get_base_name () == 'charter-ietf-shmoo-01-04.txt' :
452+ print ('Is in list' )
453+
449454 return render (request , 'doc/drafts_for_ad.html' , {
450455 'form' :form , 'docs' :results , 'meta' :meta , 'ad_name' : ad .plain_name (), 'blocked_docs' : blocked_docs
451456 })
0 commit comments