Skip to content
This repository has been archived by the owner on Jun 4, 2021. It is now read-only.

Commit

Permalink
Fix string types in migrations for Python 3
Browse files Browse the repository at this point in the history
This change removes the leading `b` from strings in the migrations. Python 3 differentiates between strings and bytes, and this causes `makemigrations` to make new migrations to convert all the `b''` strings in the migrations to regular strings. This change avoids creating those superfluous migrations.
  • Loading branch information
willbarton committed Dec 17, 2019
1 parent 4aa8a11 commit 0fc5569
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions retirement_api/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,19 @@ class Migration(migrations.Migration):
('title', models.CharField(max_length=500)),
('slug', models.SlugField(blank=True)),
('question', models.TextField(blank=True)),
('answer_yes_a_subhed', models.CharField(help_text=b'Under 50', max_length=255, blank=True)),
('answer_yes_a', models.TextField(help_text=b'Under 50', blank=True)),
('answer_yes_b_subhed', models.CharField(help_text=b'50 and older', max_length=255, blank=True)),
('answer_yes_b', models.TextField(help_text=b'50 and older', blank=True)),
('answer_no_a_subhed', models.CharField(help_text=b'Under 50', max_length=255, blank=True)),
('answer_no_a', models.TextField(help_text=b'Under 50', blank=True)),
('answer_no_b_subhed', models.CharField(help_text=b'50 and older', max_length=255, blank=True)),
('answer_no_b', models.TextField(help_text=b'50 and older', blank=True)),
('answer_unsure_a_subhed', models.CharField(help_text=b'Under 50', max_length=255, blank=True)),
('answer_unsure_a', models.TextField(help_text=b'Under 50', blank=True)),
('answer_unsure_b_subhed', models.CharField(help_text=b'50 and older', max_length=255, blank=True)),
('answer_unsure_b', models.TextField(help_text=b'50 and older', blank=True)),
('workflow_state', models.CharField(default=b'SUBMITTED', max_length=255, choices=[(b'APPROVED', b'Approved'), (b'REVISED', b'Revised'), (b'SUBMITTED', b'Submitted')])),
('answer_yes_a_subhed', models.CharField(help_text='Under 50', max_length=255, blank=True)),
('answer_yes_a', models.TextField(help_text='Under 50', blank=True)),
('answer_yes_b_subhed', models.CharField(help_text='50 and older', max_length=255, blank=True)),
('answer_yes_b', models.TextField(help_text='50 and older', blank=True)),
('answer_no_a_subhed', models.CharField(help_text='Under 50', max_length=255, blank=True)),
('answer_no_a', models.TextField(help_text='Under 50', blank=True)),
('answer_no_b_subhed', models.CharField(help_text='50 and older', max_length=255, blank=True)),
('answer_no_b', models.TextField(help_text='50 and older', blank=True)),
('answer_unsure_a_subhed', models.CharField(help_text='Under 50', max_length=255, blank=True)),
('answer_unsure_a', models.TextField(help_text='Under 50', blank=True)),
('answer_unsure_b_subhed', models.CharField(help_text='50 and older', max_length=255, blank=True)),
('answer_unsure_b', models.TextField(help_text='50 and older', blank=True)),
('workflow_state', models.CharField(default='SUBMITTED', max_length=255, choices=[('APPROVED', 'Approved'), ('REVISED', 'Revised'), ('SUBMITTED', 'Submitted')])),
],
),
migrations.CreateModel(
Expand Down

0 comments on commit 0fc5569

Please sign in to comment.