Renamed hasAtLeastOneRecord to hasRecord.
authorLennard de Rijk <ljvderijk@gmail.com>
Thu, 30 Jul 2009 10:01:57 +0200
changeset 2689 18d8486fd411
parent 2688 dfe0439a0711
child 2690 730676c00907
Renamed hasAtLeastOneRecord to hasRecord.
app/soc/logic/models/survey.py
app/soc/views/helper/list_info.py
app/soc/views/models/student_project.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:
--- 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, _):
--- 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)