Skip to content

Commit 68df1dd

Browse files
committed
bug: updates __eq__ comparison on TableConstraint
1 parent 3deff1d commit 68df1dd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

google/cloud/bigquery/table.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3547,8 +3547,9 @@ def __eq__(self, other):
35473547
if not isinstance(other, TableConstraints) and other is not None:
35483548
raise TypeError("The value provided is not a BigQuery TableConstraints.")
35493549
return (
3550-
self.primary_key == other.primary_key if other.primary_key else None
3551-
) and (self.foreign_keys == other.foreign_keys if other.foreign_keys else None)
3550+
self.primary_key == (other.primary_key if other.primary_key else None)
3551+
and self.foreign_keys == (other.foreign_keys if other.foreign_keys else None)
3552+
)
35523553

35533554
@classmethod
35543555
def from_api_repr(cls, resource: Dict[str, Any]) -> "TableConstraints":

0 commit comments

Comments
 (0)