Solved some merging problems and use the getRecordLogic where needed.
--- a/app/soc/logic/models/survey.py Tue Jun 30 17:55:43 2009 +0200
+++ b/app/soc/logic/models/survey.py Tue Jun 30 18:02:10 2009 +0200
@@ -193,15 +193,12 @@
return self.getForFields(fields, unique=True)
-<<<<<<< local
-=======
def getRecordLogic(self):
"""Returns SurveyRecordLogic that belongs to this SurveyLogic.
"""
return self.record_logic
->>>>>>> other
def getUserRole(self, user, survey, project):
"""Gets the role of a user for a project, used for SurveyRecordGroup.
--- a/app/soc/views/models/survey.py Tue Jun 30 17:55:43 2009 +0200
+++ b/app/soc/views/models/survey.py Tue Jun 30 18:02:10 2009 +0200
@@ -38,7 +38,6 @@
from soc.logic import cleaning
from soc.logic import dicts
from soc.logic.models.survey import logic as survey_logic
-from soc.logic.models.survey import results_logic
from soc.logic.models.survey import GRADES
from soc.logic.models.user import logic as user_logic
from soc.models.survey import Survey
@@ -737,6 +736,8 @@
"""View for SurveyRecord and SurveyRecordGroup.
"""
+ results_logic = params['logic'].getRecordLogic()
+
user = user_logic.getForCurrentAccount()
# TODO(ajaksu) use the named parameter link_id from the re