changeset 59:d452fff7c52e

getLastArrivals changed
author dwinter
date Thu, 02 May 2013 10:14:52 +0200
parents 09900782c855
children dc41deabc8f8 2ad8aa9d306c
files MPIWGStaff.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MPIWGStaff.py	Thu May 02 09:57:54 2013 +0200
+++ b/MPIWGStaff.py	Thu May 02 10:14:52 2013 +0200
@@ -1141,9 +1141,9 @@
     def getLastArrivals(self,limit=None):
         """getlast arrivals"""
         if not limit:
-            selectStr="select * from personal_www_list_web where publish_the_data = 'yes' and is_scholar='yes' order by date_from DESC"
+            selectStr="select * from personal_www_list_web where publish_the_data = 'yes' and is_scholar='yes' and date_from < CURRENT_DATE order by date_from DESC"
         else:
-            selectStr="select * from personal_www_list_web where publish_the_data = 'yes' and is_scholar='yes' order by date_from DESC limit %s"%limit  
+            selectStr="select * from personal_www_list_web where publish_the_data = 'yes' and is_scholar='yes' and date_from < CURRENT_DATE order by date_from DESC limit %s"%limit  
         
         res=self.members.executeZSQL(selectStr)