(domain, data_source_id)
return result['value'] if result else 0
Return the number of data registry report configurations that use the given data source.
Return the number of data registry report configurations that use the given data source.
Return the number of data registry report configurations that use the given data source .
def get_number_of_registry_report_configs_by_data_source(domain, data_source_id):
    """
    Return the number of data registry report configurations that use the given data source.
    """
    from corehq.apps.userreports.models import RegistryReportConfiguration
    result = RegistryReportConfiguration.view(
        'registry_report_configs/view',
        reduce=True,
        key=[domain, data_source_id]
    ).one()
    return result['value'] if result else 0
def get_number_of_registry_report_configs_by_data_source ( domain , data_source_id ) : from corehq . apps . userreports . models import RegistryReportConfiguration result = RegistryReportConfiguration . view ( 'registry_report_configs/view' , reduce = True , key = [ domain , data_source_id ] ) . one ( ) return result [ 'value' ] if result else 0