Remove the remaining occurences of uniq_key.
authorMadhusudan.C.S <madhusudancs@gmail.com>
Tue, 18 Jan 2011 22:01:02 +0530
changeset 470 68884c9b61e0
parent 469 87f03c28f5de
child 471 4929cb6a6a9e
Remove the remaining occurences of uniq_key.
pytask/profile/regbackend.py
pytask/profile/utils.py
--- a/pytask/profile/regbackend.py	Tue Jan 18 21:59:20 2011 +0530
+++ b/pytask/profile/regbackend.py	Tue Jan 18 22:01:02 2011 +0530
@@ -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):
-
     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)
-
--- a/pytask/profile/utils.py	Tue Jan 18 21:59:20 2011 +0530
+++ b/pytask/profile/utils.py	Tue Jan 18 22:01:02 2011 +0530
@@ -9,7 +9,7 @@
     """
 
     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]