# HG changeset patch # User Lennard de Rijk # Date 1248940917 -7200 # Node ID 18d8486fd411e509716f01c3edc4237cce2aaa5a # Parent dfe0439a0711ab08407500bc37b97d77e765e81f Renamed hasAtLeastOneRecord to hasRecord. diff -r dfe0439a0711 -r 18d8486fd411 app/soc/logic/models/survey.py --- a/app/soc/logic/models/survey.py Thu Jul 30 09:53:22 2009 +0200 +++ b/app/soc/logic/models/survey.py Thu Jul 30 10:01:57 2009 +0200 @@ -346,7 +346,7 @@ # return the scope return entity.scope - def hasAtLeastOneRecord(self, survey_entity): + def hasRecord(self, survey_entity): """Returns True iff the given Survey has at least one SurveyRecord. Args: diff -r dfe0439a0711 -r 18d8486fd411 app/soc/views/helper/list_info.py --- a/app/soc/views/helper/list_info.py Thu Jul 30 09:53:22 2009 +0200 +++ b/app/soc/views/helper/list_info.py Thu Jul 30 10:01:57 2009 +0200 @@ -67,7 +67,7 @@ project_survey_count = len(project_surveys) for project_survey in project_surveys: - if not project_survey_logic.hasAtLeastOneRecord(project_survey): + if not project_survey_logic.hasRecord(project_survey): project_survey_count = project_survey_count - 1 # count the number of have been active GradingProjectSurveys @@ -75,7 +75,7 @@ grading_survey_count = len(grading_surveys) for grading_survey in grading_surveys: - if not grading_survey_logic.hasAtLeastOneRecord(grading_survey): + if not grading_survey_logic.hasRecord(grading_survey): grading_survey_count = grading_survey_count - 1 def wrapper(item, _): diff -r dfe0439a0711 -r 18d8486fd411 app/soc/views/models/student_project.py --- a/app/soc/views/models/student_project.py Thu Jul 30 09:53:22 2009 +0200 +++ b/app/soc/views/models/student_project.py Thu Jul 30 10:01:57 2009 +0200 @@ -413,7 +413,7 @@ for list in content: # remove all the surveys that have no records attached list['data'] = [i for i in list['data'] if - list['logic'].hasAtLeastOneRecord(i)] + list['logic'].hasRecord(i)] # return the List Object with the filtered list content return soc.logic.lists.Lists(content)