Skip to content

Commit ef2b95d

Browse files
committed
updates len() checks
1 parent af02937 commit ef2b95d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

google/cloud/bigquery/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3680,7 +3680,7 @@ def insert_rows(
36803680
if selected_fields is not None:
36813681
schema = selected_fields
36823682

3683-
if not schema:
3683+
if len(schema) == 0:
36843684
raise ValueError(
36853685
(
36863686
"Could not determine schema for table '{}'. Call client.get_table() "
@@ -4029,7 +4029,7 @@ def list_rows(
40294029

40304030
# No schema, but no selected_fields. Assume the developer wants all
40314031
# columns, so get the table resource for them rather than failing.
4032-
elif not schema:
4032+
elif len(schema) == 0:
40334033
table = self.get_table(table.reference, retry=retry, timeout=timeout)
40344034
schema = table.schema
40354035

0 commit comments

Comments
 (0)