Merged in [19132] from jennifer@painless-security.com:
Skip populate_volunteers forward migration if nomcom2021 is not in the database. Fixes #3306.
- Legacy-Id: 19141
Note: SVN reference [19132] has been migrated to Git commit d4271e0525
This commit is contained in:
commit
6791bbe5f9
|
@ -5,7 +5,9 @@ from django.db import migrations
|
|||
|
||||
def forward(apps, schema_editor):
|
||||
NomCom = apps.get_model('nomcom','NomCom')
|
||||
nc = NomCom.objects.get(group__acronym='nomcom2021')
|
||||
nc = NomCom.objects.filter(group__acronym='nomcom2021').first()
|
||||
if nc is None:
|
||||
return # nothing to do if the NomCom in question does not exist
|
||||
|
||||
nc.is_accepting_volunteers = True
|
||||
nc.save()
|
||||
|
|
Loading…
Reference in a new issue