(data_source_config_id)
Add filter to data source to prevent it from being updated by DB changes
Add filter to data source to prevent it from being updated by DB changes
Add filter to data source to prevent it from being updated by DB changes
def _filter_data_source_changes(data_source_config_id):
        """
        Add filter to data source to prevent it from being updated by DB changes
        """
        # Reload using the ID instead of just passing in the object to avoid ResourceConflicts
        data_source_config = get_ucr_datasource_config_by_id(data_source_config_id)
        data_source_config.configured_filter = {
            # An expression that is always false:
            "type": "boolean_expression",
            "operator": "eq",
            "expression": 1,
            "property_value": 2,
        }
        data_source_config.validate()
        data_source_config.save()
def _filter_data_source_changes ( data_source_config_id ) : # Reload using the ID instead of just passing in the object to avoid ResourceConflicts data_source_config = get_ucr_datasource_config_by_id ( data_source_config_id ) data_source_config . configured_filter = { # An expression that is always false: "type" : "boolean_expression" , "operator" : "eq" , "expression" : 1 , "property_value" : 2 , } data_source_config . validate ( ) data_source_config . save ( )