X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethods%2FGetPCUs.py;h=298094c205192d041faa37a8e7a9b1e1454ae3db;hb=f7ce7ce813d4c44502629820a3583f32a99a98f7;hp=aee8f4a319e845e0a35ff99be5a038cd4657a62a;hpb=9a608e111c7f8182f51753ea3f563ebc19eb4c71;p=plcapi.git diff --git a/PLC/Methods/GetPCUs.py b/PLC/Methods/GetPCUs.py index aee8f4a..298094c 100644 --- a/PLC/Methods/GetPCUs.py +++ b/PLC/Methods/GetPCUs.py @@ -34,7 +34,7 @@ class GetPCUs(Method): returns = [PCU.fields] def call(self, auth, pcu_filter = None, return_fields = None): - # If we are not admin + # If we are not admin if not (isinstance(self.caller, Person) and 'admin' in self.caller['roles']): # Return only the PCUs at our site valid_pcu_ids = [] @@ -69,7 +69,7 @@ class GetPCUs(Method): # Remove pcu_id if not specified if added_fields: for pcu in pcus: - if 'pcu_id' in pcu: - del pcu['pcu_id'] + if 'pcu_id' in pcu: + del pcu['pcu_id'] return pcus