#25837: migration fails when there is initial option set on form field -------------------------------+-------------------------------------- Reporter: kaselis | Owner: nobody Type: Uncategorized | Status: closed Component: Uncategorized | Version: 1.9rc1 Severity: Normal | Resolution: invalid Keywords: | Triage Stage: Unreviewed Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------+-------------------------------------- Changes (by knbk):
* status: new => closed * needs_better_patch: => 0 * resolution: => invalid * needs_tests: => 0 * needs_docs: => 0 Comment: You cannot query the database when a file is imported. When you use `initial=Item.objects.all()`, the query will be lazy, and it won't result in an error. If you need to evaluate the queryset before passing it to initial, you need to do so in the `__init__` method of your form. This probably works fine on 1.8 because you have an existing database in your 1.8 setup. It won't work if you deploy in a new 1.8 environment without an existing database. -- Ticket URL: <https://code.djangoproject.com/ticket/25837#comment:1> 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 post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/065.326de58c74a9f7be279ca277433947fb%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.