diff MPIWGStaff.py @ 59:d452fff7c52e

getLastArrivals changed
author dwinter
date Thu, 02 May 2013 10:14:52 +0200
parents 84879a3f91a6
children 63184d71c014 2ad8aa9d306c
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)