Skip to content

Commit

Permalink
Fix duplicate timepoint inputs with spinup/lookahead (#1157)
Browse files Browse the repository at this point in the history
  • Loading branch information
anamileva committed Sep 23, 2024
1 parent adbf199 commit c4f1f00
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,9 @@ def get_prj_tmp_opr_inputs_from_db(
sql = f"""
SELECT project, prj_tbl.timepoint, {data_column}
FROM
(SELECT project, stage_id, timepoint
-- Use DISTINCT in case there are spinup/lookahead timepoints,
-- which will show up more than once otherwise
(SELECT DISTINCT project, stage_id, timepoint
FROM project_operational_timepoints
WHERE project_portfolio_scenario_id = {subscenarios.PROJECT_PORTFOLIO_SCENARIO_ID}
AND project_operational_chars_scenario_id = {subscenarios.PROJECT_OPERATIONAL_CHARS_SCENARIO_ID}
Expand Down

0 comments on commit c4f1f00

Please sign in to comment.