Mercurial > hg > MPIWGWeb
changeset 263:738129610f36 new_pro_struct
getMemberList gets status filter parameter.
164: Staff Sortierung Predoc und Postdocs
Task-Url: https://it-dev.mpiwg-berlin.mpg.de/tracs/webpage/ticket/164
author | casties |
---|---|
date | Wed, 13 Aug 2014 13:04:48 +0200 |
parents | e7b3c7ab9eb5 |
children | 0cfe34c454ff |
files | MPIWGStaff.py |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/MPIWGStaff.py Wed Aug 13 12:25:34 2014 +0200 +++ b/MPIWGStaff.py Wed Aug 13 13:04:48 2014 +0200 @@ -100,7 +100,7 @@ def getMemberList(self, department=None, sortBy='last_name', onlyCurrent=False, arrivedWithin=None, - onlyPublished=True, onlyWithEmail=True, onlyScholar=True, limit=0): + onlyPublished=True, onlyWithEmail=True, onlyScholar=True, status=None, limit=0): """Return the list of members. Returns a list of MPIWGStaffMember objects. @@ -128,6 +128,10 @@ if arrivedWithin is not None: wheres.append("date_from > CURRENT_DATE - interval %s") args.append(arrivedWithin) + + if status is not None: + wheres.append("status ilike %s") + args.append('%%%s%%'%status) # assemble query query = "SELECT * FROM personal_www_list"