Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion warehouse/packaging/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,13 +375,17 @@ def sync_bigquery_release_files(request):
request.tm.commit()
request.tm.begin()

table_schemas = {
table_name: bq.get_table(table_name).schema for table_name in table_names
}

for missing_file in missing_files:
# Add the objects back into the new session
request.db.add(missing_file)
release_file = missing_file.file

for table_name in table_names:
table_schema = bq.get_table(table_name).schema
table_schema = table_schemas[table_name]

# Using the schema to populate the data allows us to automatically
# set the values to their respective fields rather than assigning
Expand Down