1- # Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
1+ # Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
22# All rights reserved. Contact: Pasi Eronen <pasi.eronen@nokia.com>
33#
44# Redistribution and use in source and binary forms, with or without
@@ -231,6 +231,7 @@ class RfcWrapper:
231231 publication_date = None
232232 maturity_level = None
233233 ietf_process = None
234+ draft_name = None
234235
235236 def __init__ (self , rfcindex , rfc = None , idinternal = None ):
236237 self ._rfcindex = rfcindex
@@ -253,6 +254,16 @@ def __init__(self, rfcindex, rfc=None, idinternal=None):
253254 if not self .maturity_level :
254255 self .maturity_level = "Unknown"
255256
257+ ids = InternetDraft .objects .filter (rfc_number = self .rfc_number )
258+ if len (ids ) >= 1 :
259+ self .draft_name = ids [0 ].filename
260+ elif self ._rfcindex and self ._rfcindex .draft :
261+ # rfcindex occasionally includes drafts that were not
262+ # really submitted to IETF (e.g. April 1st)
263+ ids = InternetDraft .objects .filter (filename = self ._rfcindex .draft )
264+ if len (ids ) > 0 :
265+ self .draft_name = self ._rfcindex .draft
266+
256267 def _rfc_doc_list (self , name ):
257268 if (not self ._rfcindex ) or (not self ._rfcindex .__dict__ [name ]):
258269 return None
@@ -495,30 +506,6 @@ def view_sort_key_byad(self):
495506 else :
496507 return "3"
497508
498- # def debug_data(self):
499- # s = ""
500- # if self.draft:
501- # s = s + "draft("+self.draft.filename+","+str(self.draft.id_document_tag)+","+str(self.draft.rfc_number)+")"
502- # if self.idinternal:
503- # s = s + ",idinternal()"
504- # if self._rfc:
505- # s = s + ",rfc("+str(self._rfc.rfc_number)+")"
506- # if self.rfcIndex:
507- # s = s + ",rfcIndex("+str(self.rfcIndex.rfc_number)+")"
508- # if self.rfc_idinternal:
509- # s = s + ",rfc_idinternal("+str(self.rfc_idinternal.draft_id)+")"
510- # return s
511-
512-
513- # if idinternal:
514- # o['stateChangeNoticeTo'] = idinternal.state_change_notice_to
515- # if idinternal.returning_item > 0:
516- # o['telechatReturningItem'] = True
517- # if idinternal.telechat_date:
518- # o['telechatDate'] = str(idinternal.telechat_date)
519- # o['onTelechatAgenda'] = (idinternal.agenda > 0)
520- #
521-
522509# ---------------------------------------------------------------------------
523510
524511class BallotWrapper :
0 commit comments