diff --git a/arches/app/etl_modules/bulk_data_deletion.py b/arches/app/etl_modules/bulk_data_deletion.py index d28895b953c..b1ddfcbd94f 100644 --- a/arches/app/etl_modules/bulk_data_deletion.py +++ b/arches/app/etl_modules/bulk_data_deletion.py @@ -38,19 +38,20 @@ def get_number_of_deletions(self, graph_id, nodegroup_id, resourceids): WHERE graphid = %(graph_id)s; """ + number_of_tiles = 0 if nodegroup_id: with connection.cursor() as cursor: cursor.execute(tile_deletion_count, params) row = cursor.fetchone() - print(row) number_of_resource, number_of_tiles = row - elif not resourceids: + elif resourceids: + number_of_resource = len(resourceids) + else: with connection.cursor() as cursor: cursor.execute(resource_deletion_count, params) row = cursor.fetchone() number_of_resource, = row - number_of_tiles = 0 return number_of_resource, number_of_tiles