diff --git a/google/cloud/bigtable_v2/services/bigtable/async_client.py b/google/cloud/bigtable_v2/services/bigtable/async_client.py index 08317e1eb..85a9c43f0 100644 --- a/google/cloud/bigtable_v2/services/bigtable/async_client.py +++ b/google/cloud/bigtable_v2/services/bigtable/async_client.py @@ -344,7 +344,7 @@ def read_rows( if regex_match and regex_match.group("table_name"): header_params["table_name"] = regex_match.group("table_name") - if request.app_profile_id: + if request.app_profile_id is not None: # temporary fix: support empty headers for btql routing header_params["app_profile_id"] = request.app_profile_id routing_param_regex = re.compile( @@ -463,7 +463,7 @@ def sample_row_keys( if regex_match and regex_match.group("table_name"): header_params["table_name"] = regex_match.group("table_name") - if request.app_profile_id: + if request.app_profile_id is not None: # temporary fix: support empty headers for btql routing header_params["app_profile_id"] = request.app_profile_id routing_param_regex = re.compile( @@ -603,7 +603,7 @@ async def mutate_row( if regex_match and regex_match.group("table_name"): header_params["table_name"] = regex_match.group("table_name") - if request.app_profile_id: + if request.app_profile_id is not None: # temporary fix: support empty headers for btql routing header_params["app_profile_id"] = request.app_profile_id routing_param_regex = re.compile( @@ -737,7 +737,7 @@ def mutate_rows( if regex_match and regex_match.group("table_name"): header_params["table_name"] = regex_match.group("table_name") - if request.app_profile_id: + if request.app_profile_id is not None: # temporary fix: support empty headers for btql routing header_params["app_profile_id"] = request.app_profile_id routing_param_regex = re.compile( @@ -914,7 +914,7 @@ async def check_and_mutate_row( if regex_match and regex_match.group("table_name"): header_params["table_name"] = regex_match.group("table_name") - if request.app_profile_id: + if request.app_profile_id is not None: # temporary fix: support empty headers for btql routing header_params["app_profile_id"] = request.app_profile_id routing_param_regex = re.compile( @@ -1028,7 +1028,7 @@ async def ping_and_warm( if regex_match and regex_match.group("name"): header_params["name"] = regex_match.group("name") - if request.app_profile_id: + if request.app_profile_id is not None: # temporary fix: support empty headers for btql routing header_params["app_profile_id"] = request.app_profile_id if header_params: @@ -1165,7 +1165,7 @@ async def read_modify_write_row( if regex_match and regex_match.group("table_name"): header_params["table_name"] = regex_match.group("table_name") - if request.app_profile_id: + if request.app_profile_id is not None: # temporary fix: support empty headers for btql routing header_params["app_profile_id"] = request.app_profile_id routing_param_regex = re.compile( diff --git a/google/cloud/bigtable_v2/services/bigtable/client.py b/google/cloud/bigtable_v2/services/bigtable/client.py index 42723c661..79f30292f 100644 --- a/google/cloud/bigtable_v2/services/bigtable/client.py +++ b/google/cloud/bigtable_v2/services/bigtable/client.py @@ -768,7 +768,7 @@ def read_rows( if regex_match and regex_match.group("table_name"): header_params["table_name"] = regex_match.group("table_name") - if request.app_profile_id: + if request.app_profile_id is not None: # temporary fix: support empty headers for btql routing header_params["app_profile_id"] = request.app_profile_id routing_param_regex = re.compile( @@ -884,7 +884,7 @@ def sample_row_keys( if regex_match and regex_match.group("table_name"): header_params["table_name"] = regex_match.group("table_name") - if request.app_profile_id: + if request.app_profile_id is not None: # temporary fix: support empty headers for btql routing header_params["app_profile_id"] = request.app_profile_id routing_param_regex = re.compile( @@ -1021,7 +1021,7 @@ def mutate_row( if regex_match and regex_match.group("table_name"): header_params["table_name"] = regex_match.group("table_name") - if request.app_profile_id: + if request.app_profile_id is not None: # temporary fix: support empty headers for btql routing header_params["app_profile_id"] = request.app_profile_id routing_param_regex = re.compile( @@ -1152,7 +1152,7 @@ def mutate_rows( if regex_match and regex_match.group("table_name"): header_params["table_name"] = regex_match.group("table_name") - if request.app_profile_id: + if request.app_profile_id is not None: # temporary fix: support empty headers for btql routing header_params["app_profile_id"] = request.app_profile_id routing_param_regex = re.compile( @@ -1326,7 +1326,7 @@ def check_and_mutate_row( if regex_match and regex_match.group("table_name"): header_params["table_name"] = regex_match.group("table_name") - if request.app_profile_id: + if request.app_profile_id is not None: # temporary fix: support empty headers for btql routing header_params["app_profile_id"] = request.app_profile_id routing_param_regex = re.compile( @@ -1437,7 +1437,7 @@ def ping_and_warm( if regex_match and regex_match.group("name"): header_params["name"] = regex_match.group("name") - if request.app_profile_id: + if request.app_profile_id is not None: # temporary fix: support empty headers for btql routing header_params["app_profile_id"] = request.app_profile_id if header_params: @@ -1571,7 +1571,7 @@ def read_modify_write_row( if regex_match and regex_match.group("table_name"): header_params["table_name"] = regex_match.group("table_name") - if request.app_profile_id: + if request.app_profile_id is not None: # temporary fix: support empty headers for btql routing header_params["app_profile_id"] = request.app_profile_id routing_param_regex = re.compile(