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
abdelmegahed authored and abdelmegahedgoogle committed Apr 17, 2023
1 parent 0acf3ff commit 90fc3fb
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 90fc3fb

Please sign in to comment.