Skip to content

Commit

Permalink
hotfix: handle case when expirationMs is None
Browse files Browse the repository at this point in the history
  • Loading branch information
abdelmegahedgoogle committed Apr 14, 2023
1 parent 5838fd3 commit 78ce26a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion google/cloud/bigquery/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,11 @@ def partition_expiration(self, value):

if self.time_partitioning is None:
self._properties[api_field] = {"type": TimePartitioningType.DAY}
self._properties[api_field]["expirationMs"] = str(value)

if value is None:
self._properties[api_field]["expirationMs"] = None
else:
self._properties[api_field]["expirationMs"] = str(value)

@property
def clustering_fields(self):
Expand Down

0 comments on commit 78ce26a

Please sign in to comment.