Skip to content

Commit

Permalink
Merge pull request #9838 from archesproject/9837_fix_preview_bulk_editor
Browse files Browse the repository at this point in the history
Fix the preview in the string bulk editor, #9837
  • Loading branch information
apeters authored Jul 27, 2023
2 parents c390c1b + 015fc01 commit 8661345
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions arches/app/etl_modules/base_data_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,26 +172,15 @@ def get_preview_data(self, graph_id, node_id, resourceids, language_code, old_te
+ text_query
)

tile_sub_query = (
resource_count_query = (
"""
AND resourceinstanceid IN (SELECT DISTINCT t.resourceinstanceid FROM tiles t, nodes n
SELECT count(DISTINCT t.resourceinstanceid) FROM tiles t, nodes n
WHERE t.nodegroupid = n.nodegroupid
"""
+ node_id_query
+ graph_id_query
+ resourceids_query
+ text_query
+ ")"
)

resource_count_query = (
"""
SELECT count(n.resourceinstanceid) FROM resource_instances n
WHERE 0 = 0
"""
+ graph_id_query
+ resourceids_query
+ tile_sub_query
)

with connection.cursor() as cursor:
Expand Down

0 comments on commit 8661345

Please sign in to comment.