#22289: Field with Validator always considered changed in migrations
----------------------------+---------------------------------------
Reporter: blueyed | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 1.7-alpha-2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+---------------------------------------
Comment (by erikr):
I used SQLite, not PostgreSQL, but I strongly doubt that this is a
database-specific issue: validators aren't actually stored in the
database, as far as I know.
Regarding comment:5: it makes sense that the instances might be two
different ones, that's why there's a custom `__eq__`. The `__eq__` you're
looking at doesn't seem to be the right one, when comparing these two
tuples, it should call `__eq__` of `RegexValidator`. I notice that in
there, it compares `self.regex`, which at that point is a compiled regex,
not the original string. So the next step would be to look into whether,
in your case, `RegexValidator.__eq__` says they are not equal, and why.
--
Ticket URL: <https://code.djangoproject.com/ticket/22289#comment:6>
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.457752889e29813f763e06ae372dc161%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.