#26468: Bug in models.functions.ConcatPair for sqlite -------------------------------------+------------------------------------- Reporter: jerch | Owner: nobody Type: Bug | Status: new Component: Database layer | Version: 1.8 (models, ORM) | Severity: Normal | Resolution: Keywords: sqlite concat | Triage Stage: | Unreviewed Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+-------------------------------------
Comment (by jarshwah): I can't reproduce: {{{ In [6]: from django.db import connection In [7]: connection.vendor Out[7]: u'sqlite' In [8]: concat = Concat(F('name'), Value('-'), F('motto'), output_field=CharField()) In [9]: Company.objects.annotate(concat=concat).first().concat Out[9]: u'HI-' In [10]: concat = Concat(F('name'), Value('"-"'), F('motto'), output_field=CharField()) In [11]: Company.objects.annotate(concat=concat).first().concat Out[11]: u'HI"-"' In [12]: import django In [13]: django.get_version() Out[13]: '1.10.dev20160401110429' }}} Note that I tried both Value('"-"') and Value('-'). You shouldn't be injecting quotes into Value, it'll take care of itself. Can you please post the full queryset you're running that generates the error, and also print the underlying query of the queryset, like this: {{{ qs = Model.objects.whatever() print(qs.query) }}} Also, what version of Django are you using? Can you reproduce on master? -- Ticket URL: <https://code.djangoproject.com/ticket/26468#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 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/063.47753ab73ef7b1987a069641ae0c7a36%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.