Add used_roles to Group and default_used_roles to GroupFeatures. Dynamically build the group edit form to provide a field for all used_roles. Fixes #2785 and #2572. Partially addresses #2160.
- Legacy-Id: 17960
Note: SVN reference [17908] has been migrated to Git commit 2862727d02
33 lines
983 B
Python
33 lines
983 B
Python
# Generated by Django 2.0.13 on 2020-06-09 04:39
|
|
|
|
from django.db import migrations, models
|
|
|
|
|
|
def forward(apps, schema_editor):
|
|
MeetingRegistration = apps.get_model('stats', 'MeetingRegistration')
|
|
# Set attended=True on all existing records,
|
|
#
|
|
# Going forward, this will be unset on registration
|
|
# (ietf.api.views.api_new_meeting_registration()), and set on attendee
|
|
# import (ietf.stats.utils.get_meeting_registration_data() )
|
|
MeetingRegistration.objects.update(attended=True)
|
|
|
|
def reverse(apps, schema_editor):
|
|
pass
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('stats', '0002_add_meetingregistration_fields'),
|
|
('group', '0029_add_used_roles_and_default_used_roles'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.AddField(
|
|
model_name='meetingregistration',
|
|
name='attended',
|
|
field=models.BooleanField(default=False),
|
|
),
|
|
migrations.RunPython(forward, reverse),
|
|
]
|