From 77eefd2cbbba44207197ae84f049e3482f6143f2 Mon Sep 17 00:00:00 2001 From: maxachis Date: Mon, 18 Nov 2024 09:32:34 -0500 Subject: [PATCH] Add previously removed columns to agencies data source subquery --- database_client/subquery_logic.py | 13 ++++++++++++- .../data_sources_advanced_schemas.py | 13 ++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/database_client/subquery_logic.py b/database_client/subquery_logic.py index 28880491..4c95af87 100644 --- a/database_client/subquery_logic.py +++ b/database_client/subquery_logic.py @@ -54,7 +54,18 @@ def get_subquery_params( get_subquery_params, relation=Relations.AGENCIES_EXPANDED, linking_column="agencies", - columns=["id", "name"], + columns=[ + "id", + "name", + "submitted_name", + "state_name", + "locality_name", + "state_iso", + "county_name", + "agency_type", + "jurisdiction_type", + "homepage_url" + ], ) data_requests = partialmethod( diff --git a/middleware/schema_and_dto_logic/primary_resource_schemas/data_sources_advanced_schemas.py b/middleware/schema_and_dto_logic/primary_resource_schemas/data_sources_advanced_schemas.py index b83c6546..c16a456d 100644 --- a/middleware/schema_and_dto_logic/primary_resource_schemas/data_sources_advanced_schemas.py +++ b/middleware/schema_and_dto_logic/primary_resource_schemas/data_sources_advanced_schemas.py @@ -28,7 +28,18 @@ class DataSourceGetSchema(DataSourceExpandedSchema): agencies = fields.List( fields.Nested( AgenciesExpandedSchema( - only=["id", "name"], + only=[ + "id", + "name", + "submitted_name", + "state_name", + "locality_name", + "state_iso", + "county_name", + "agency_type", + "jurisdiction_type", + "homepage_url" + ], ), metadata=get_json_metadata("The agencies associated with the data source."), ),