From: Stephen Soltesz Date: Mon, 19 Nov 2007 15:40:41 +0000 (+0000) Subject: Added person['enabled'] check to the notify_owners() function. This will X-Git-Tag: PLCAPI-4.2-0~27 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=4984769c242b72daf93900bfd69a177f064ae9f2;p=plcapi.git Added person['enabled'] check to the notify_owners() function. This will prevent the bug where disabled persons with the tech-contact role are notified of boot notifications. --- diff --git a/PLC/Boot.py b/PLC/Boot.py index cd3a7389..221fbb2d 100644 --- a/PLC/Boot.py +++ b/PLC/Boot.py @@ -40,8 +40,8 @@ def notify_owners(method, node, message_id, persons = Persons(method.api, site['person_ids']) for person in persons: - if include_pis and 'pi' in person['roles'] or \ - include_techs and 'tech' in person['roles']: + if (include_pis and 'pi' in person['roles'] and person['enabled']) or \ + (include_techs and 'tech' in person['roles'] and person['enabled']) : To.append(("%s %s" % (person['first_name'], person['last_name']), person['email'])) # Send email