#23548: Transform.relabeled_clone calls own constructor with wrong number of arguments -------------------------------------+------------------------------------- Reporter: ris | Owner: nobody Type: Bug | Status: new Component: Database layer | Version: 1.7 (models, ORM) | Severity: Normal | Resolution: Keywords: lookup transform | Triage Stage: Accepted orm subquery | Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+-------------------------------------
Comment (by ris): Updating this with example models.py for creating this failure: {{{ from django.db import models from django.db.models import Transform class Sqrt ( Transform ): lookup_name = "sqrt" def as_sql ( self , qn , connection ): lhs , params = qn.compile ( self.lhs ) return "sqrt(%s)" % lhs , params models.FloatField.register_lookup ( Sqrt ) class ModelA ( models.Model ): x = models.FloatField () class ModelB ( models.Model ): a = models.ForeignKey ( ModelA ) }}} Issuing the query: {{{ ModelB.objects.filter ( a__pk__in = ModelA.objects.filter ( x__sqrt__lt = 5 ) ) }}} raises the above exception. I've used this test case to verify that this bug is still present in django 1.8.2. -- Ticket URL: <https://code.djangoproject.com/ticket/23548#comment:2> 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/061.ccc05f51d3e53e2b3b7de88f4c5cbbe7%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.