Skip to content

Commit

Permalink
fix: add number of columns to table metadata action (#390)
Browse files Browse the repository at this point in the history
  • Loading branch information
vncsna authored Sep 15, 2023
1 parent 10dfbd0 commit 683f8be
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions basedosdados_api/api/v1/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ def update_table_metadata(modeladmin, request, queryset: QuerySet):
try:
bq_table = client.get_table(table.db_slug)
table.number_rows = bq_table.num_rows or None
table.number_columns = len(bq_table.schema) or None
table.compressed_file_size = bq_table.num_bytes or None
table.uncompressed_file_size = bq_table.num_bytes or None
table.save()
Expand Down

0 comments on commit 683f8be

Please sign in to comment.