(self, locations)
Submit the case blocks creating the delgate case access
        for the location(s).
Submit the case blocks creating the delgate case access
        for the location(s).
Submit the case blocks creating the delgate case access for the location ( s ) .
def create_location_delegates(self, locations):
        """
        Submit the case blocks creating the delgate case access
        for the location(s).
        """
        self.clear_location_delegates()

        if not locations:
            return

        index = {}
        for location in locations:
            if not location.location_type_object.administrative:
                sp = SupplyInterface(self.domain).get_by_location(location)
                index.update(self.supply_point_index_mapping(sp))

        from corehq.apps.commtrack.util import location_map_case_id
        caseblock = CaseBlock.deprecated_init(
            create=True,
            case_type=USER_LOCATION_OWNER_MAP_TYPE,
            case_id=location_map_case_id(self),
            owner_id=self._id,
            index=index
        )

        self.submit_location_block(caseblock, "create_location_delegates")
def create_location_delegates ( self , locations ) : self . clear_location_delegates ( ) if not locations : return index = { } for location in locations : if not location . location_type_object . administrative : sp = SupplyInterface ( self . domain ) . get_by_location ( location ) index . update ( self . supply_point_index_mapping ( sp ) ) from corehq . apps . commtrack . util import location_map_case_id caseblock = CaseBlock . deprecated_init ( create = True , case_type = USER_LOCATION_OWNER_MAP_TYPE , case_id = location_map_case_id ( self ) , owner_id = self . _id , index = index ) self . submit_location_block ( caseblock , "create_location_delegates" )