Skip to content

Commit

Permalink
Cleanup of get_data_packages (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
dogversioning authored Sep 18, 2024
1 parent 92c2bde commit c153c10
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/handlers/dashboard/get_data_packages.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
""" Lambda for retrieving list of available data packages
"""

import ast
import os

from src.handlers.shared.decorators import generic_error_handler
Expand All @@ -17,5 +17,5 @@ def data_packages_handler(event, context):
os.environ.get("BUCKET_NAME"),
f"{BucketPath.CACHE.value}/{JsonFilename.DATA_PACKAGES.value}.json",
)
res = http_response(200, data_packages, allow_cors=True)
res = http_response(200, ast.literal_eval(data_packages), allow_cors=True)
return res
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ def test_get_data_packages(mock_bucket):
assert res["statusCode"] == 200
assert DATA_PACKAGE_COUNT == 2
assert "Access-Control-Allow-Origin" in res["headers"]
assert res["body"] == '["study__encounter", "other_study__encounter"]'

0 comments on commit c153c10

Please sign in to comment.