From: Thierry Parmentelat Date: Tue, 23 Nov 2010 21:35:36 +0000 (+0100) Subject: comment in GetPersons X-Git-Tag: plcapi-5.0-19~36 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=7ff3079ce042525acbf00e0d4fe555e8988c128d;p=plcapi.git comment in GetPersons --- diff --git a/PLC/Methods/GetPersons.py b/PLC/Methods/GetPersons.py index a209b87..9439420 100644 --- a/PLC/Methods/GetPersons.py +++ b/PLC/Methods/GetPersons.py @@ -52,8 +52,11 @@ class GetPersons(Method): if not valid_person_ids: return [] - # xxx this looks suspicious - # we need to add this restriction even if person_filter is defined + # this may look suspicious; what if person_filter is not None ? + # turns out the results are getting filtered again below, so we're safe + # although this part of the code does not always trigger, it's probably + # a sensible performance enhancement for all the times + # when GetPersons() gets called without an argument if person_filter is None: person_filter = valid_person_ids