Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix duplicate timepoint inputs with spinup/lookahead #1157

Merged
merged 2 commits into from
Sep 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading