Skip to content

Commit

Permalink
Revert "update queries to get version as well as name for csm (#498)" (
Browse files Browse the repository at this point in the history
…#521)

This reverts commit 80cb225.
  • Loading branch information
sdevalapurkar authored Sep 16, 2021
1 parent ffcedd3 commit bfeafcb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion api/src/queries/codes/code-queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const getActivitySQL = (): SQLStatement => SQL`SELECT activity_id as id,
* @returns {SQLStatement} sql query object
*/
export const getCommonSurveyMethodologiesSQL = (): SQLStatement =>
SQL`SELECT common_survey_methodology_id as id, CONCAT(name, ' - ', version) as name from common_survey_methodology;`;
SQL`SELECT common_survey_methodology_id as id, name from common_survey_methodology;`;

/**
* SQL query to fetch project type codes.
Expand Down
5 changes: 1 addition & 4 deletions api/src/queries/survey/survey-view-queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,7 @@ export const getSurveyForViewSQL = (surveyId: number): SQLStatement | null => {
s.geojson as geometry,
per.number,
per.type,
CASE
WHEN s.common_survey_methodology_id IS NOT NULL THEN CONCAT(csm.name, ' - ', csm.version)
WHEN s.common_survey_methodology_id IS NULL THEN null
END as common_survey_methodology,
csm.name as common_survey_methodology,
sfs.project_funding_source_id as pfs_id,
pfs.funding_amount::numeric::int,
pfs.funding_start_date,
Expand Down

0 comments on commit bfeafcb

Please sign in to comment.