- if self.caller['site_ids']:
- sites = Sites(self.api, self.caller['site_ids'])
- for site in sites:
- valid_pcu_ids += site['pcu_ids']
+
+ if isinstance(self.caller, Person):
+ site_ids = self.caller['site_ids']
+ elif isinstance(self.caller, Node):
+ site_ids = [self.caller['site_id']]
+
+ for site in Sites(self.api, site_ids):
+ valid_pcu_ids += site['pcu_ids']