From 959e33b76c5102f21431f7a3c275e8f382ae75c7 Mon Sep 17 00:00:00 2001 From: Jenny V Medina Date: Wed, 20 Mar 2024 11:38:03 -0400 Subject: [PATCH] [IBCDPE-848] Query for `id` only (#39) Query for `id` only when getting submissions --- src/orca/services/synapse/ops.py | 2 +- tests/services/synapse/test_ops.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/orca/services/synapse/ops.py b/src/orca/services/synapse/ops.py index 42c1347..e97655b 100644 --- a/src/orca/services/synapse/ops.py +++ b/src/orca/services/synapse/ops.py @@ -94,7 +94,7 @@ def get_submissions_with_status( # Get all submissions for the given ``submission_view`` query_results = self.client.tableQuery( - f"select * from {submission_view} where status = '{submission_status}'" + f"select id from {submission_view} where status = '{submission_status}'" ) submission_ids = query_results.asDataFrame()["id"].tolist() diff --git a/tests/services/synapse/test_ops.py b/tests/services/synapse/test_ops.py index 766def2..a556d0f 100644 --- a/tests/services/synapse/test_ops.py +++ b/tests/services/synapse/test_ops.py @@ -134,7 +134,7 @@ def test_get_submissions_with_status( # Assertions syn_mock.tableQuery.assert_called_once_with( - f"select * from {submission_view} where status = '{submission_status}'" + f"select id from {submission_view} where status = '{submission_status}'" ) table_mock.asDataFrame.assert_called() assert result == input_dict["id"]