#30926: passing an empty string to help_text in model fields using ugettext_lazy
causes new migrations without any change
---------------------------------------+------------------------
Reporter: mabuelhagag | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 2.2
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
---------------------------------------+------------------------
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),
),
]
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/30926>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/054.f839f947accd602fb8805e8a99e9e3b1%40djangoproject.com.