From ca4ee5230c47289425148f8ceebdbd9daf0a94cb Mon Sep 17 00:00:00 2001 From: Madhusudan.C.S Date: Tue, 18 Jan 2011 22:01:02 +0530 Subject: Remove the remaining occurences of uniq_key. --- pytask/profile/regbackend.py | 10 +++++----- pytask/profile/utils.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pytask/profile/regbackend.py b/pytask/profile/regbackend.py index 0fc264d..1022aec 100644 --- a/pytask/profile/regbackend.py +++ b/pytask/profile/regbackend.py @@ -1,15 +1,15 @@ -from pytask.profile.models import Profile from pytask.profile.forms import CreateProfileForm -from pytask.utils import make_key from registration.signals import user_registered -def user_created(sender, user, request, **kwargs): +def user_created(sender, user, request, **kwargs): data = request.POST.copy() - data.update({"user": user.id, "uniq_key": make_key(Profile)}) + data.update({ + "user": user.id, + }) form = CreateProfileForm(data) form.save() -user_registered.connect(user_created) +user_registered.connect(user_created) diff --git a/pytask/profile/utils.py b/pytask/profile/utils.py index 745901c..bc33464 100644 --- a/pytask/profile/utils.py +++ b/pytask/profile/utils.py @@ -9,7 +9,7 @@ def get_notification(nid, user): """ user_notifications = user.notification_sent_to.filter(is_deleted=False).order_by('sent_date') - current_notifications = user_notifications.filter(uniq_key=nid) + current_notifications = user_notifications.filter(pk=nid) if user_notifications: current_notification = current_notifications[0] -- cgit