Skip to content

Commit

Permalink
Merge pull request #315 from IFB-ElixirFr/coordinating-platform-to-unit
Browse files Browse the repository at this point in the history
rename also in db "Coordinating platform" -> "Coordinating unit"
  • Loading branch information
bryan-brancotte authored Aug 9, 2024
2 parents be1f78b + 02bdaa6 commit 309c231
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 2 deletions.
5 changes: 4 additions & 1 deletion ifbcat_api/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1191,7 +1191,10 @@ class TeamAdmin(
'logo',
'updated_at',
)
list_filter = (IsActiveListFilter,)
list_filter = (
IsActiveListFilter,
'ifbMembership',
)
fieldsets = (
(
'Team info',
Expand Down
42 changes: 42 additions & 0 deletions ifbcat_api/migrations/0195_alter_team_ifbmembership.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Generated by Django 3.2.12 on 2022-06-01 11:30

from django.db import migrations, models


def migrate(apps, schema_editor):
apps.get_model("ifbcat_api", "Team").objects.filter(ifbMembership='Coordinating platform').update(
ifbMembership='Coordinating unit'
)


def migrate_back(apps, schema_editor):
apps.get_model("ifbcat_api", "Team").objects.filter(ifbMembership='Coordinating unit').update(
ifbMembership='Coordinating platform'
)


class Migration(migrations.Migration):

dependencies = [
('ifbcat_api', '0194_alter_event_maintainers_alter_training_maintainers'),
]

operations = [
migrations.AlterField(
model_name='team',
name='ifbMembership',
field=models.CharField(
choices=[
('Associated Team', 'Associated Team'),
('Contributing platform', 'Contributing platform'),
('Coordinating unit', 'Coordinating unit'),
('Member platform', 'Member platform'),
('None', 'None'),
],
default='None',
help_text='Type of membership the bioinformatics team has to IFB.',
max_length=255,
),
),
migrations.RunPython(code=migrate, reverse_code=migrate_back),
]
2 changes: 1 addition & 1 deletion ifbcat_api/model/team.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ class CertificationType(models.TextChoices):
class IfbMembershipType(models.TextChoices):
ASSOCIATED_TEAM = 'Associated Team', _('Associated Team')
CONTRIBUTING_TEAM = 'Contributing platform', _('Contributing platform')
COORDINATING_TEAM = 'Coordinating platform', _('Coordinating unit')
COORDINATING_TEAM = 'Coordinating unit', _('Coordinating unit')
MEMBER_PLATFORM = 'Member platform', _('Member platform')
NO_MEMBERSHIP = 'None', _('None')

Expand Down

0 comments on commit 309c231

Please sign in to comment.