Skip to content

Commit

Permalink
fix: migrate the legacy StreamName
Browse files Browse the repository at this point in the history
  • Loading branch information
rjsparks committed Jul 25, 2024
1 parent 043765c commit 4f14038
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ietf/name/fixtures/names.json
Original file line number Diff line number Diff line change
Expand Up @@ -3464,7 +3464,7 @@
"parent_types": [],
"req_subm_approval": true,
"role_order": "[\n \"chair\",\n \"delegate\"\n]",
"session_purposes": "[\n \"officehours\"\n]",
"session_purposes": "[\n \"officehours\",\n \"regular\"\n]",
"show_on_agenda": true
},
"model": "group.groupfeatures",
Expand Down
21 changes: 21 additions & 0 deletions ietf/name/migrations/0014_change_legacy_stream_desc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright The IETF Trust 2024, All Rights Reserved

from django.db import migrations

def forward(apps, schema_editor):
StreamName = apps.get_model("name", "StreamName")
StreamName.objects.filter(pk="legacy").update(desc="Legacy")

def reverse(apps, schema_editor):
StreamName = apps.get_model("name", "StreamName")
StreamName.objects.filter(pk="legacy").update(desc="Legacy stream")

class Migration(migrations.Migration):

dependencies = [
("name", "0013_narrativeminutes"),
]

operations = [
migrations.RunPython(forward, reverse)
]

0 comments on commit 4f14038

Please sign in to comment.