Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename also in db "Coordinating platform" -> "Coordinating unit" #315

Merged
merged 1 commit into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading