def get(self): sf_obj = SFAccess(self.settings) # checking whether report IDs were supplied if "consultantBillability" not in self.settings: return self.render('500.html', code=500, error="consultantBillability report ID was " "not found in configuration") consultant_bilability = \ yield sf_obj.get_billability_report(self.settings["consultantBillability"]) data = { "consultant_bilability": consultant_bilability } return self.render('sf_billability_detailed.html', data=data)
def get(self): sf_obj = SFAccess(self.settings) coroutine_list = [] # checking whether report IDs were supplied if "consultantUtilisation" not in self.settings or "consultantBillability" not in self.settings: return self.render('500.html', code=500, error="consultantUtilisation or consultantBillability report IDs were " "not found in configuration") coroutine_list.append(sf_obj.get_utilisation_report(self.settings["consultantUtilisation"])) coroutine_list.append(sf_obj.get_billability_groupings_report(self.settings["consultantBillability"])) utilisation_data, group_billability = yield coroutine_list data = { "utilisation_data": utilisation_data or None, "group_billability": group_billability or None } return self.render('salesforce.html', data=data)