#30777: File isn't treated correctly, when in user-defined field -------------------------------------+------------------------------------- Reporter: Simonas0 | Owner: nobody Type: Bug | Status: new Component: File | Version: master uploads/storage | Keywords: custom field, Severity: Normal | composite field, user-defined Triage Stage: | field, file Unreviewed | Has patch: 0 Needs documentation: 0 | Needs tests: 0 Patch needs improvement: 0 | Easy pickings: 0 UI/UX: 0 | -------------------------------------+------------------------------------- When `models.FileField` is in `models.Model`, everything works as expected. When `models.FileField` is in `models.Field` which is in `models.Model`, when saving, `ProgrammingError` `can't adapt type 'TemporaryUploadedFile'` is raised. That happens, because `FileField.save_form_data()` makes `FileField` to hold `FieldFile`, but `models.Field` makes its `FileField` to hold `TemporaryUploadedFile`. I've prepared repo with minimal setup to reproduce bug: https://github.com/Simonas0/django_playground
-- Ticket URL: <https://code.djangoproject.com/ticket/30777> 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 django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/051.2ba9b29055787ff779a2cdf5117f802d%40djangoproject.com.