#28705: Wrong annotation when used with order_by
-------------------------------------+-------------------------------------
               Reporter:  Rafael     |          Owner:  nobody
  Capucho                            |
                   Type:  Bug        |         Status:  new
              Component:             |        Version:  1.11
  Uncategorized                      |       Keywords:  Annotate, ORM,
               Severity:  Normal     |  Order_by
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 Related to old closed ticket: https://code.djangoproject.com/ticket/25316

 # Models

 {{{
 class Application(models.Model):
     package_name = models.CharField(max_length=128, null=False,
 blank=True)
     package_version_code = models.IntegerField(blank=True)
     package_version_name = models.CharField(max_length=64, null=False,
 blank=True)
     label = models.CharField(max_length=64, null=False, blank=True)

     class Meta:
         ordering = ['label', 'package_version_code']

 class Profile(models.Model):
     applications = models.ManyToManyField(
         'applications.Application',
         related_name='application_%(class)s',
         blank=True
     )

 class Device(models.Model):
    profile = models.ForeignKey(
         Profile,
         related_name='devices',
         blank=True,
         null=True
     )
 }}}

 The error is:
 [[Image(https://i.imgur.com/JbUyRQJ.png)]]

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28705>
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/056.ef78623c7f873e686df93fdc1fbc9cbf%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to