X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethods%2FGetPCUs.py;h=c59fa40fafe7ca7987fd9d96c3b9e8d5cb76029f;hb=3b44c0228c26dc43d985185afc225caa5f48c1fb;hp=8b3b91fb4e837e00c39896983b76b9004df0417a;hpb=997c5bbe5b0576ae8c9c8d52a80dab1dcecf615a;p=plcapi.git diff --git a/PLC/Methods/GetPCUs.py b/PLC/Methods/GetPCUs.py index 8b3b91f..c59fa40 100644 --- a/PLC/Methods/GetPCUs.py +++ b/PLC/Methods/GetPCUs.py @@ -62,7 +62,7 @@ class GetPCUs(Method): # Filter out PCUs that are not viewable if not (isinstance(self.caller, Person) and 'admin' in self.caller['roles']): - pcus = filter(lambda pcu: pcu['pcu_id'] in valid_pcu_ids, pcus) + pcus = [pcu for pcu in pcus if pcu['pcu_id'] in valid_pcu_ids] # Remove pcu_id if not specified if added_fields: