Skip to content

Commit 6e8836f

Browse files
committed
migration Updated
1 parent ed50ea3 commit 6e8836f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

readthedocs/redirects/migrations/0003_add_default_redirect_http_status_to_302.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,19 @@
55
from django.db import migrations, models
66

77

8+
def change_http_status(apps, schema_editor):
9+
Redirect = apps.get_model('redirects', 'Redirect')
10+
Redirect.objects.update(http_status=302)
11+
12+
813
class Migration(migrations.Migration):
914

1015
dependencies = [
1116
('redirects', '0002_add_missing_model_change_migrations'),
1217
]
1318

1419
operations = [
20+
migrations.RunPython(change_http_status),
1521
migrations.AlterField(
1622
model_name='redirect',
1723
name='http_status',

0 commit comments

Comments
 (0)