Skip to content

Commit e6dc163

Browse files
committed
fix: allow empty location for cluster update
1 parent 6c2ea4c commit e6dc163

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

google/cloud/bigtable/cluster.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -511,9 +511,12 @@ def delete(self):
511511
def _to_pb(self):
512512
"""Create cluster proto buff message for API calls"""
513513
client = self._instance._client
514-
location = client.instance_admin_client.common_location_path(
515-
client.project, self.location_id
516-
)
514+
if self.location_id:
515+
location = client.instance_admin_client.common_location_path(
516+
client.project, self.location_id
517+
)
518+
else:
519+
location = None
517520

518521
cluster_pb = instance.Cluster(
519522
location=location,

0 commit comments

Comments
 (0)