app/soc/logic/cleaning.py
changeset 1984 eb02fd5427c5
parent 1962 7c9e517f2089
child 1985 4ff03ca639fd
--- a/app/soc/logic/cleaning.py	Sat Mar 21 18:15:18 2009 +0000
+++ b/app/soc/logic/cleaning.py	Sun Mar 22 14:51:37 2009 +0000
@@ -162,8 +162,7 @@
     """
     link_id = clean_link_id(field_name)(self)
 
-    user_entity = user_logic.getForFields({'link_id': link_id},
-        unique=True)
+    user_entity = user_logic.getFromKeyFields({'link_id': link_id})
 
     if not user_entity:
       # user does not exist
@@ -205,8 +204,7 @@
     """
     link_id = clean_link_id(field_name)(self)
 
-    user_entity = user_logic.getForFields({'link_id': link_id},
-        unique=True)
+    user_entity = user_logic.getFromKeyFields({'link_id': link_id})
 
     if user_entity:
       # user exists already
@@ -430,8 +428,8 @@
     # if both fields were valid do this check
     if link_id and user_account:
       # get the user from the link_id in the form
-      fields = {'link_id': link_id}
-      user_entity = user_logic.getForFields(fields, unique=True)
+
+      user_entity = user_logic.getFromKeyFields({'link_id': link_id})
 
       # if it's not the user's current account
       if user_entity.account != user_account: