From ef12b0374f962b2576b20458abbe28f9203d732f Mon Sep 17 00:00:00 2001 From: Vinicius Date: Wed, 14 Feb 2024 15:49:15 -0300 Subject: [PATCH] fix: exclude datasets under review from update metadata --- bd_api/apps/api/v1/tasks.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bd_api/apps/api/v1/tasks.py b/bd_api/apps/api/v1/tasks.py index ba033b90..f8efe114 100644 --- a/bd_api/apps/api/v1/tasks.py +++ b/bd_api/apps/api/v1/tasks.py @@ -82,6 +82,7 @@ def get_uncompressed_file_size(table: Table, bq_table: GBQTable) -> int | None: tables = ( Table.objects .exclude(status__slug__in=["under_review"]) + .exclude(dataset__status__slug__in=["under_review"]) .order_by("updated_at") .all() ) # fmt: skip @@ -89,6 +90,7 @@ def get_uncompressed_file_size(table: Table, bq_table: GBQTable) -> int | None: tables = ( Table.objects.filter(pk__in=table_pks) .exclude(status__slug__in=["under_review"]) + .exclude(dataset__status__slug__in=["under_review"]) .order_by("updated_at") .all() )