# HG changeset patch # User Pawel Solyga # Date 1238779776 0 # Node ID eb4565a8e5b457f4496e7a6c0c9769fd131b325d # Parent 0aa24d8655ace4071e7471bdf6fcd5e0e4ba78fe Style fixes and removal of unused imports in soc.logic.models modules. Patch by: Pawel Solyga Reviewed by: to-be-reviewed diff -r 0aa24d8655ac -r eb4565a8e5b4 app/soc/logic/models/group.py --- a/app/soc/logic/models/group.py Fri Apr 03 17:27:31 2009 +0000 +++ b/app/soc/logic/models/group.py Fri Apr 03 17:29:36 2009 +0000 @@ -22,7 +22,6 @@ ] -from soc.cache import sidebar from soc.logic.models import base import soc.models.group diff -r 0aa24d8655ac -r eb4565a8e5b4 app/soc/logic/models/mentor.py --- a/app/soc/logic/models/mentor.py Fri Apr 03 17:27:31 2009 +0000 +++ b/app/soc/logic/models/mentor.py Fri Apr 03 17:29:36 2009 +0000 @@ -63,8 +63,10 @@ """ - from soc.logic.models.student_project import logic as student_project_logic - from soc.logic.models.student_proposal import logic as student_proposal_logic + from soc.logic.models.student_project import logic as \ + student_project_logic + from soc.logic.models.student_proposal import logic as \ + student_proposal_logic fields = {'mentor': entity} @@ -88,7 +90,8 @@ Proposals possible mentor lists. """ - from soc.logic.models.student_proposal import logic as student_proposal_logic + from soc.logic.models.student_proposal import logic \ + as student_proposal_logic value = entity_properties[name] diff -r 0aa24d8655ac -r eb4565a8e5b4 app/soc/logic/models/presence_with_tos.py --- a/app/soc/logic/models/presence_with_tos.py Fri Apr 03 17:27:31 2009 +0000 +++ b/app/soc/logic/models/presence_with_tos.py Fri Apr 03 17:29:36 2009 +0000 @@ -23,7 +23,6 @@ from soc.logic.models import presence -from soc.logic.models import presence as presence_logic import soc.models.presence_with_tos @@ -33,7 +32,7 @@ """ def __init__(self, model=soc.models.presence_with_tos.PresenceWithToS, - base_model=None, scope_logic=presence_logic): + base_model=None, scope_logic=presence): """Defines the name, key_name and model for this entity. """ diff -r 0aa24d8655ac -r eb4565a8e5b4 app/soc/logic/models/role.py --- a/app/soc/logic/models/role.py Fri Apr 03 17:27:31 2009 +0000 +++ b/app/soc/logic/models/role.py Fri Apr 03 17:29:36 2009 +0000 @@ -103,14 +103,14 @@ """ if self.disallow_last_resign: - # check if this is the last active role for it's scope - fields = {'scope': entity.scope, + # check if this is the last active role for it's scope + fields = {'scope': entity.scope, 'status': 'active'} - roles = self.getForFields(fields, limit=2) + roles = self.getForFields(fields, limit=2) - # if this it the last one return error message - if len(roles) <= 1: - return DEF_LAST_RESIGN_ERROR_FMT + # if this it the last one return error message + if len(roles) <= 1: + return DEF_LAST_RESIGN_ERROR_FMT # resignation is possible return None diff -r 0aa24d8655ac -r eb4565a8e5b4 app/soc/logic/models/site.py --- a/app/soc/logic/models/site.py Fri Apr 03 17:27:31 2009 +0000 +++ b/app/soc/logic/models/site.py Fri Apr 03 17:29:36 2009 +0000 @@ -22,7 +22,6 @@ ] -from soc.cache import sidebar from soc.logic.models import presence_with_tos import soc.models.presence_with_tos