Skip to content

Commit d4271e0

Browse files
Skip populate_volunteers forward migration if nomcom2021 is not in the database. Fixes ietf-tools#3306. Commit ready for merge.
- Legacy-Id: 19132
1 parent 9a0d818 commit d4271e0

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

ietf/nomcom/migrations/0012_populate_volunteers.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55

66
def forward(apps, schema_editor):
77
NomCom = apps.get_model('nomcom','NomCom')
8-
nc = NomCom.objects.get(group__acronym='nomcom2021')
8+
nc = NomCom.objects.filter(group__acronym='nomcom2021').first()
9+
if nc is None:
10+
return # nothing to do if the NomCom in question does not exist
911

1012
nc.is_accepting_volunteers = True
1113
nc.save()

0 commit comments

Comments
 (0)