# HG changeset patch # User Lennard de Rijk # Date 1233163985 0 # Node ID 0fe0cb8f72539a8a76e714cfa7a05e50a153925a # Parent 26fade94886b374ed5e9c400800e5c8865bb4b28 Changed access.py to comply more with the style of the module. diff -r 26fade94886b -r 0fe0cb8f7253 app/soc/views/helper/access.py --- a/app/soc/views/helper/access.py Wed Jan 28 17:31:02 2009 +0000 +++ b/app/soc/views/helper/access.py Wed Jan 28 17:33:05 2009 +0000 @@ -358,12 +358,14 @@ self.checkIsLoggedIn(django_args) - if self.user or user_logic.isFormerAccount(self.id): - message_fmt = DEF_USER_ACCOUNT_INVALID_MSG_FMT % { - 'email' : self.id.email()} - raise out_of_band.LoginRequest(message_fmt=message_fmt) + if not self.user and not user_logic.isFormerAccount(self.id): + # this account has not been used yet + return - return + message_fmt = DEF_USER_ACCOUNT_INVALID_MSG_FMT % { + 'email' : self.id.email()} + raise out_of_band.LoginRequest(message_fmt=message_fmt) + def checkHasUserEntity(self, django_args): """Raises an alternate HTTP response if Google Account has no User entity.