Changes between Initial Version and Version 2 of Ticket #11472


Ignore:
Timestamp:
Jul 13, 2009, 9:41:15 PM (15 years ago)
Author:
Ramiro Morales
Comment:

(reformatted description)

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #11472 – Description

    initial v2  
    44
    55I have to Models both with relationships to Users, cutting down to relavant parts:
    6 
     6{{{
    77class Project(models.Model):
    88    owner = models.ForeignKey(User)
     
    1010class Release(models.Model):
    1111     owner = models.ForeignKey(User)
    12 
     12}}}
    1313In my view methods when I use:
    14 
     14{{{
    1515u = User.objects.exclude(project__owner__isnull=True, release__owner__isnull=True).distinct()
    16 
     16}}}
    1717it returns an error of "no such column: U1.owner_id"
    1818
    1919Alternatively when I try:
    20 
     20{{{
    2121u = User.objects.filter(project__owner__isnull=False).distinct() | User.objects.filter(project__owner__isnull=False).distinct()
    22 
     22}}}
    2323This returns a list of ALL  users regardless being an owner of a project or release.  Using either of those queries alone also returns all users.
    2424
Back to Top