From: Tony Mack Date: Fri, 23 Feb 2007 17:48:02 +0000 (+0000) Subject: - send notification emails only to pi's that are enabled X-Git-Tag: PLCAPI-4.2-0~176 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=2c876d2eed500bc20be5aaf0cbbcfb10c722544c;p=plcapi.git - send notification emails only to pi's that are enabled --- diff --git a/PLC/Methods/VerifyPerson.py b/PLC/Methods/VerifyPerson.py index f4f3263..3f1591a 100644 --- a/PLC/Methods/VerifyPerson.py +++ b/PLC/Methods/VerifyPerson.py @@ -105,7 +105,7 @@ class VerifyPerson(Method): for site in person_sites: person_ids.update(site['person_ids']) persons = Persons(self.api, person_ids) - pis = filter(lambda person: 'pi' in person['roles'], persons) + pis = filter(lambda person: 'pi' in person['roles'] and person['enabled'], persons) # Send e-mail to PI(s) and copy the user To = [("%s %s" % (pi['first_name'], pi['last_name']), pi['email']) for pi in pis]