Skip to content

Commit

Permalink
nit, #10186
Browse files Browse the repository at this point in the history
  • Loading branch information
njkim committed Oct 25, 2023
1 parent 4fcf16f commit 9d85ae3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions arches/app/etl_modules/bulk_data_deletion.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 9d85ae3

Please sign in to comment.