diff --git a/src/edrn.collabgroups/src/edrn/collabgroups/migrations/0006_remove_committee_co_chair_committee_co_chairs.py b/src/edrn.collabgroups/src/edrn/collabgroups/migrations/0006_remove_committee_co_chair_committee_co_chairs.py new file mode 100644 index 00000000..31b3dcd9 --- /dev/null +++ b/src/edrn.collabgroups/src/edrn/collabgroups/migrations/0006_remove_committee_co_chair_committee_co_chairs.py @@ -0,0 +1,29 @@ +# Generated by Django 4.2.14 on 2024-09-10 18:17 + +from django.db import migrations +import modelcluster.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ("ekeknowledge", "0019_remove_protocol_fieldofresearch_and_more"), + ("edrncollabgroups", "0005_committee_documents_heading"), + ] + + operations = [ + migrations.RemoveField( + model_name="committee", + name="co_chair", + ), + migrations.AddField( + model_name="committee", + name="co_chairs", + field=modelcluster.fields.ParentalManyToManyField( + blank=True, + related_name="committees_I_co_chair", + to="ekeknowledge.person", + verbose_name="Co-Chair(s)", + ), + ), + ] diff --git a/src/edrn.collabgroups/src/edrn/collabgroups/models.py b/src/edrn.collabgroups/src/edrn/collabgroups/models.py index 713e7e19..f5018776 100644 --- a/src/edrn.collabgroups/src/edrn/collabgroups/models.py +++ b/src/edrn.collabgroups/src/edrn/collabgroups/models.py @@ -125,9 +125,8 @@ class Committee(Page): Person, null=True, blank=True, verbose_name='Chair', related_name='committees_I_chair', on_delete=models.SET_NULL ) - co_chair = models.ForeignKey( - Person, null=True, blank=True, verbose_name='Co-Chair', related_name='committees_I_co_chair', - on_delete=models.SET_NULL + co_chairs = ParentalManyToManyField( + Person, blank=True, verbose_name='Co-Chair(s)', related_name='committees_I_co_chair' ) members = ParentalManyToManyField( Person, blank=True, verbose_name='Members', related_name='committees_I_belong_to' @@ -144,7 +143,7 @@ class Committee(Page): FieldPanel('description'), FieldPanel('documents_heading'), FieldPanel('chair'), - FieldPanel('co_chair'), + FieldPanel('co_chairs'), FieldPanel('members'), FieldPanel('program_officers'), FieldPanel('project_scientists'), diff --git a/src/edrn.collabgroups/src/edrn/collabgroups/templates/edrn.collabgroups/committee.html b/src/edrn.collabgroups/src/edrn/collabgroups/templates/edrn.collabgroups/committee.html index 35053f6b..6f213241 100644 --- a/src/edrn.collabgroups/src/edrn/collabgroups/templates/edrn.collabgroups/committee.html +++ b/src/edrn.collabgroups/src/edrn/collabgroups/templates/edrn.collabgroups/committee.html @@ -89,11 +89,19 @@