def lookup(self, site_code): case_location = get_supply_point_and_location( self.domain, site_code ) return case_location.case
def lookup(self, site_code): case_location = get_supply_point_and_location(self.domain, site_code) return case_location.case
def get_supply_point_and_location(self, loc_code): """return the supply point case referenced by loc_code""" case_location_tuple = get_supply_point_and_location(self.domain.name, loc_code) if not case_location_tuple: raise SMSError('invalid location code "%s"' % loc_code) return case_location_tuple