summaryrefslogtreecommitdiff
path: root/devel/management/commands
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-10-04 17:44:40 -0500
committerDan McGee <dan@archlinux.org>2010-10-04 17:44:40 -0500
commit82eb9de99335c0032986fb3273f9951756205fb9 (patch)
treee3f5270af40d9b840f7798b9ac40476de368523e /devel/management/commands
parente847030d83796a5f8cccce2fb409dd4d672f71f3 (diff)
Make user profile a OneToOneFieldrelease_2010-10-05
We had this set up as a unique ForeignKey before, which adds some indirection due to the RelatedManager object being there. By making it a OneToOneField, we can get the profile object directly, enforce uniqueness, and also use it in select_related() calls to make our profiles page a bit more efficient. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'devel/management/commands')
-rw-r--r--devel/management/commands/reporead.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/devel/management/commands/reporead.py b/devel/management/commands/reporead.py
index 544c4ecb..f7dac9ae 100644
--- a/devel/management/commands/reporead.py
+++ b/devel/management/commands/reporead.py
@@ -130,7 +130,7 @@ def find_user(userstring):
def user_email():
return User.objects.get(email=email)
def profile_email():
- return User.objects.get(userprofile_user__public_email=email)
+ return User.objects.get(userprofile__public_email=email)
def user_name():
# yes, a bit odd but this is the easiest way since we can't always be
# sure how to split the name. Ensure every 'token' appears in at least