#16450: UserProfile filtering breaks between Django 1.2.5 and 1.3
--------------------------------------+-------------------------------
Reporter: bjorn@… | Owner: nobody
Type: Bug | Status: closed
Milestone: | Component: Uncategorized
Version: 1.3 | Severity: Normal
Resolution: worksforme | 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 lukeplant):
* status: new => closed
* needs_better_patch: => 0
* resolution: => worksforme
* needs_tests: => 0
* needs_docs: => 0
Comment:
Your description is rather short on details (like what is 'self'? What is
'self.users'?). I tried to guess, and used the following class:
{{{
#!python
from django.db import models
from django.contrib.auth.models import User
class UserProfile(models.Model):
user = models.ForeignKey(User, unique=True)
public_profile = models.BooleanField()
}}}
Then ran the following:
{{{
>>> from django.contrib.auth.models import User
>>>
User.objects.filter(userprofile__public_profile=True).order_by('first_name')
[]
}}}
AUTH_PROFILE_MODULE is irrelevant here (though I tried with and without
it) - it only affects the 'get_profile()' method, as documented. What you
are describing is simple `ForeignKey` functionality breaking, which is of
course extremely unlikely, as hundreds of tests and thousands of projects
would have broken if that had happened.
So I'm forced to mark this as WORKSFORME. If you can provide details that
will allow us to reproduce this, please re-open the ticket.
--
Ticket URL: <https://code.djangoproject.com/ticket/16450#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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.