From 9eceb7226e4b2e7a78bc74c84f9932e0c1256da7 Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Fri, 5 Jan 2007 16:00:09 +0000 Subject: [PATCH] - dont return 'password', 'verification_key' or 'verification_expires' fields --- PLC/Methods/GetPersons.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/PLC/Methods/GetPersons.py b/PLC/Methods/GetPersons.py index 4de33470..f7b7c5b1 100644 --- a/PLC/Methods/GetPersons.py +++ b/PLC/Methods/GetPersons.py @@ -29,7 +29,8 @@ class GetPersons(Method): ] # Filter out password field - can_return = lambda (field, value): field not in ['password'] + can_return = lambda (field, value): field not in \ + ['password', 'verification_key', 'verification_expires'] return_fields = dict(filter(can_return, Person.fields.items())) returns = [return_fields] @@ -53,9 +54,10 @@ class GetPersons(Method): # Filter out password field if return_fields: - while 'password' in return_fields: - return_fields.remove('password') - + return_fields = filter(self.can_return, return_fields) + else: + return_fields = self.return_fields.keys() + persons = Persons(self.api, person_filter, return_fields) # Filter out accounts that are not viewable -- 2.47.0