Opened 6 years ago
Closed 6 years ago
#30926 closed Bug (duplicate)
passing an empty string to help_text in model fields using ugettext_lazy causes new migrations without any change
| Reported by: | Mohamad A. | Owned by: | nobody |
|---|---|---|---|
| Component: | Migrations | Version: | 2.2 |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
A sample of the error would be something like the following
from django.db import models
from django.utils.translation import ugettext_lazy as _
class sample(models.Model):
sample_field = models.CharField(max_length=5, help_text=_(""))
Executing makemigrations command generates new migration file without any change in the contents.
The previous model generates the following migration file:
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('mig', '0005_auto_20191029_1638'),
]
operations = [
migrations.AlterField(
model_name='sample',
name='sample_field',
field=models.CharField(help_text='', max_length=5),
),
]
Attachments (2)
Note:
See TracTickets
for help on using tickets.
Sample project