#24368: FileField needlessly serializes upload_to; same problems with some other
fields
-------------------------------+--------------------
Reporter: rdaysky | Owner: nobody
Type: Uncategorized | Status: new
Component: Migrations | Version: 1.7
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
django.db.models.fields.FileField explicitly includes upload_to in the
serialization process. This takes no part in the actual migration process
but causes errors if the value of the field is a lambda function. Instead,
the deconstruct() functions for FileField and other fields should only
serialize arguments relevant to subsequent ALTER commands issued to the
DBMS.
Other places where this problem arises include ForeignKey.limit_choices_to
— do changes to this attribute mandate a new migration and is it
appropriate to have it fail if the value is a lambda?
Once fixed, #22351 can be reverted.
--
Ticket URL: <https://code.djangoproject.com/ticket/24368>
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/050.37ae6e2c4edd6f38ccef6f526ee556e2%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.