Skip to content

Commit f1ad6a0

Browse files
committed
Merged in [11779] from rjsparks@nostrum.com:
Robustness improvements for the bluesheet migrations. - Legacy-Id: 11814 Note: SVN reference [11779] has been migrated to Git commit 54a774c
1 parent 6f05b23 commit f1ad6a0

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

ietf/meeting/migrations/0032_reconstruct_bluesheet_docs_95through96.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
import os
55

6+
import debug # pyflakes:ignore
7+
68
from django.db import migrations
79
from django.conf import settings
810

@@ -19,14 +21,20 @@ def forward(apps, schema_editor):
1921

2022
active = State.objects.get(type_id='bluesheets',slug='active')
2123

24+
print
25+
print "Attention: The following anomalies are expected:"
26+
print "There are no bluesheets for nmlrg at IETF95 or for cellar at IETF96."
27+
print "At IETF95, netmod and opsec have a different number of bluesheets than sessions."
28+
print "Please report any other warnings issued during the production migration to RjS."
29+
2230
for num in [95, 96]:
2331
mtg = Meeting.objects.get(number=num)
2432
bs_path = '%s/bluesheets/'% os.path.join(settings.AGENDA_PATH,mtg.number)
2533
if not os.path.exists(bs_path):
2634
os.makedirs(bs_path)
2735
bs_files = os.listdir(bs_path)
28-
bs_acronyms = set([x[14:-7] for x in bs_files])
29-
group_acronyms = set([x.group.acronym for x in mtg.session_set.all() if official_time(x) and x.group.type_id in ['wg','rg','ag'] and not x.agenda_note.lower().startswith('cancel')])
36+
bs_acronyms = set([x[14:].split('-')[0] for x in bs_files])
37+
group_acronyms = set([x.group.acronym for x in mtg.session_set.filter(status_id='sched') if official_time(x) and x.group.type_id in ['wg','rg','ag'] and not x.agenda_note.lower().startswith('cancel')])
3038

3139
if bs_acronyms-group_acronyms:
3240
print "Warning IETF%s : groups that have bluesheets but did not appear to meet: %s"%(num,list(bs_acronyms-group_acronyms))

0 commit comments

Comments
 (0)