Fix not working former ids feature of User Profile Developer Edit view. Add missing Error exception class to soc.logic.models.base module.
authorPawel Solyga <Pawel.Solyga@gmail.com>
Tue, 04 Nov 2008 14:09:37 +0000
changeset 441 8a7110ad3d82
parent 440 3a60d5e5c14e
child 442 92c17629af0e
Fix not working former ids feature of User Profile Developer Edit view. Add missing Error exception class to soc.logic.models.base module. Patch by: Pawel Solyga
app/soc/logic/models/base.py
app/soc/logic/site/id_user.py
--- a/app/soc/logic/models/base.py	Tue Nov 04 02:50:55 2008 +0000
+++ b/app/soc/logic/models/base.py	Tue Nov 04 14:09:37 2008 +0000
@@ -33,6 +33,11 @@
 from soc.logic import out_of_band
 
 
+class Error(Exception):
+  """Base class for all exceptions raised by this module."""
+  pass
+
+
 class Logic:
   """Base logic for entity classes.
 
--- a/app/soc/logic/site/id_user.py	Tue Nov 04 02:50:55 2008 +0000
+++ b/app/soc/logic/site/id_user.py	Tue Nov 04 14:09:37 2008 +0000
@@ -119,7 +119,7 @@
     return True
   # else: "new" email truly is new to the existing User, so keep checking
 
-  if not models.user.logic.getFromFields(id=new_id):
+  if not models.user.logic.getFromFields(email=new_id.email()):
     # new email address also does not belong to any other User,
     # so it is available
     return True