#25280: Infinite migrations created when using function based validators
-------------------------------------+-------------------------------------
Reporter: chenull | Owner: timgraham
Type: Bug | Status: assigned
Component: Migrations | Version: master
Severity: Release blocker | Resolution:
Keywords: migrations, | Triage Stage: Accepted
validators, slug |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by timgraham):
Before the commit that introduced the regression. `deep_deconstruct()`
returns:
`[<django.core.validators.RegexValidator object at 0x7fb6ca4cd780>]`
Now it returns this for historical models:
`[('django.core.validators.RegexValidator',
[re.compile('^(25[0-5]|2[0-4]\\d|[0-1]?\\d?\\d)(\\.(25[0-5]|2[0-4]\\d|[0-1]?\\d?\\d)){3}\\Z'),
'Enter a valid IPv4 address.', 'invalid']`
... or this when processing the actual models:
`('django.core.validators.RegexValidator',
[re.compile('^(25[0-5]|2[0-4]\\d|[0-1]?\\d?\\d)(\\.(25[0-5]|2[0-4]\\d|[0-1]?\\d?\\d)){3}\\Z'),
<django.utils.functional.lazy.<locals>.__proxy__ object at
0x7f3a97c44b00>, 'invalid']`
The lazy error message is not resolved, so it's treated as unequal to the
string in the historical model.
--
Ticket URL: <https://code.djangoproject.com/ticket/25280#comment:4>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/065.3166bc07fbeffe5d4a75c14357fcd85c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.