Corrected the default values of the GroupFeatures JSONField fields, and updated the migration to match.

- Legacy-Id: 15914
This commit is contained in:
Henrik Levkowetz 2019-01-24 20:08:29 +00:00
parent ef97f2a821
commit 6590e4f4ad
2 changed files with 12 additions and 12 deletions

View file

@ -17,7 +17,7 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='groupfeatures',
name='admin_roles',
field=jsonfield.fields.JSONField(default=b'chair', max_length=64),
field=jsonfield.fields.JSONField(default=b'["chair"]', max_length=64),
),
migrations.AlterField(
model_name='groupfeatures',
@ -37,22 +37,22 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='groupfeatures',
name='material_types',
field=jsonfield.fields.JSONField(default=b'slides', max_length=64),
field=jsonfield.fields.JSONField(default=b'["slides"]', max_length=64),
),
migrations.AlterField(
model_name='groupfeatures',
name='matman_roles',
field=jsonfield.fields.JSONField(default=b'ad,chair,delegate,secr', max_length=128),
field=jsonfield.fields.JSONField(default=b'["ad","chair","delegate","secr"]', max_length=128),
),
migrations.AlterField(
model_name='groupfeatures',
name='role_order',
field=jsonfield.fields.JSONField(default=b'chair,secr,member', help_text=b'The order in which roles are shown, for instance on photo pages. Enter valid JSON.', max_length=128),
field=jsonfield.fields.JSONField(default=b'["chair","secr","member"]', help_text=b'The order in which roles are shown, for instance on photo pages. Enter valid JSON.', max_length=128),
),
migrations.AlterField(
model_name='historicalgroupfeatures',
name='admin_roles',
field=jsonfield.fields.JSONField(default=b'chair', max_length=64),
field=jsonfield.fields.JSONField(default=b'["chair"]', max_length=64),
),
migrations.AlterField(
model_name='historicalgroupfeatures',
@ -72,16 +72,16 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='historicalgroupfeatures',
name='material_types',
field=jsonfield.fields.JSONField(default=b'slides', max_length=64),
field=jsonfield.fields.JSONField(default=b'["slides"]', max_length=64),
),
migrations.AlterField(
model_name='historicalgroupfeatures',
name='matman_roles',
field=jsonfield.fields.JSONField(default=b'ad,chair,delegate,secr', max_length=128),
field=jsonfield.fields.JSONField(default=b'["ad","chair","delegate","secr"]', max_length=128),
),
migrations.AlterField(
model_name='historicalgroupfeatures',
name='role_order',
field=jsonfield.fields.JSONField(default=b'chair,secr,member', help_text=b'The order in which roles are shown, for instance on photo pages. Enter valid JSON.', max_length=128),
field=jsonfield.fields.JSONField(default=b'["chair","secr","member"]', help_text=b'The order in which roles are shown, for instance on photo pages. Enter valid JSON.', max_length=128),
),
]

View file

@ -229,10 +229,10 @@ class GroupFeatures(models.Model):
agenda_type = models.ForeignKey(AgendaTypeName, null=True, default="ietf", on_delete=CASCADE)
about_page = models.CharField(max_length=64, blank=False, default="ietf.group.views.group_about" )
default_tab = models.CharField(max_length=64, blank=False, default="ietf.group.views.group_about" )
material_types = jsonfield.JSONField(max_length=64, blank=False, default="slides")
admin_roles = jsonfield.JSONField(max_length=64, blank=False, default="chair")
matman_roles = jsonfield.JSONField(max_length=128, blank=False, default="ad,chair,delegate,secr")
role_order = jsonfield.JSONField(max_length=128, blank=False, default="chair,secr,member",
material_types = jsonfield.JSONField(max_length=64, blank=False, default='["slides"]')
admin_roles = jsonfield.JSONField(max_length=64, blank=False, default='["chair"]')
matman_roles = jsonfield.JSONField(max_length=128, blank=False, default='["ad","chair","delegate","secr"]')
role_order = jsonfield.JSONField(max_length=128, blank=False, default='["chair","secr","member"]',
help_text="The order in which roles are shown, for instance on photo pages. Enter valid JSON.")