File tree Expand file tree Collapse file tree 3 files changed +47
-2
lines changed Expand file tree Collapse file tree 3 files changed +47
-2
lines changed Original file line number Diff line number Diff line change @@ -1191,7 +1191,10 @@ class TeamAdmin(
1191
1191
'logo' ,
1192
1192
'updated_at' ,
1193
1193
)
1194
- list_filter = (IsActiveListFilter ,)
1194
+ list_filter = (
1195
+ IsActiveListFilter ,
1196
+ 'ifbMembership' ,
1197
+ )
1195
1198
fieldsets = (
1196
1199
(
1197
1200
'Team info' ,
Original file line number Diff line number Diff line change
1
+ # Generated by Django 3.2.12 on 2022-06-01 11:30
2
+
3
+ from django .db import migrations , models
4
+
5
+
6
+ def migrate (apps , schema_editor ):
7
+ apps .get_model ("ifbcat_api" , "Team" ).objects .filter (ifbMembership = 'Coordinating platform' ).update (
8
+ ifbMembership = 'Coordinating unit'
9
+ )
10
+
11
+
12
+ def migrate_back (apps , schema_editor ):
13
+ apps .get_model ("ifbcat_api" , "Team" ).objects .filter (ifbMembership = 'Coordinating unit' ).update (
14
+ ifbMembership = 'Coordinating platform'
15
+ )
16
+
17
+
18
+ class Migration (migrations .Migration ):
19
+
20
+ dependencies = [
21
+ ('ifbcat_api' , '0194_alter_event_maintainers_alter_training_maintainers' ),
22
+ ]
23
+
24
+ operations = [
25
+ migrations .AlterField (
26
+ model_name = 'team' ,
27
+ name = 'ifbMembership' ,
28
+ field = models .CharField (
29
+ choices = [
30
+ ('Associated Team' , 'Associated Team' ),
31
+ ('Contributing platform' , 'Contributing platform' ),
32
+ ('Coordinating unit' , 'Coordinating unit' ),
33
+ ('Member platform' , 'Member platform' ),
34
+ ('None' , 'None' ),
35
+ ],
36
+ default = 'None' ,
37
+ help_text = 'Type of membership the bioinformatics team has to IFB.' ,
38
+ max_length = 255 ,
39
+ ),
40
+ ),
41
+ migrations .RunPython (code = migrate , reverse_code = migrate_back ),
42
+ ]
Original file line number Diff line number Diff line change @@ -183,7 +183,7 @@ class CertificationType(models.TextChoices):
183
183
class IfbMembershipType (models .TextChoices ):
184
184
ASSOCIATED_TEAM = 'Associated Team' , _ ('Associated Team' )
185
185
CONTRIBUTING_TEAM = 'Contributing platform' , _ ('Contributing platform' )
186
- COORDINATING_TEAM = 'Coordinating platform ' , _ ('Coordinating unit' )
186
+ COORDINATING_TEAM = 'Coordinating unit ' , _ ('Coordinating unit' )
187
187
MEMBER_PLATFORM = 'Member platform' , _ ('Member platform' )
188
188
NO_MEMBERSHIP = 'None' , _ ('None' )
189
189
You can’t perform that action at this time.
0 commit comments