Skip to content
Snippets Groups Projects
Commit 51812cbf authored by Charlotte Hausman's avatar Charlotte Hausman
Browse files

fix target handling for partial curation

parent 714e4c4c
No related branches found
No related tags found
1 merge request!1610fix target handling for partial curation
Pipeline #14835 passed
......@@ -231,7 +231,7 @@ class Solicitor:
elif self.argument == CuratorType.FULL:
targets = None
else:
targets = self.metadata["target_list"]
targets = list(filter(None, [target.strip() for target in self.metadata.get("target_list").split(",")]))
params = {
"telescope": self.metadata["projectMetadata"]["telescope"], # all, needed by manifest generator
......
"""fix targeted curation
Revision ID: d3bf0fcd237c
Revises: 7ec92e7da566
Create Date: 2024-03-21 11:55:05.883762
"""
from pathlib import Path
from alembic import op
# revision identifiers, used by Alembic.
revision = "d3bf0fcd237c"
down_revision = "7ec92e7da566"
branch_labels = None
depends_on = None
old_content = (Path.cwd() / "versions" / "templates" / "curator" / "metadata_2.8.2.3.txt").read_text()
new_content = (Path.cwd() / "versions" / "templates" / "curator" / "metadata_2.8.3.txt").read_text()
def upgrade():
op.execute(
f"""
UPDATE workflow_templates
SET content=E'{new_content}'
WHERE filename='metadata.json' AND workflow_name='curator'
"""
)
def downgrade():
op.execute(
f"""
UPDATE workflow_templates
SET content=E'{old_content}'
WHERE filename='metadata.json' AND workflow_name='curator'
"""
)
{
{{#product_locator}}"product_locator": "{{product_locator}}",{{/product_locator}}{{#data_src}}
"data_location": "{{data_src}}",{{/data_src}}
"product_type": "{{product_type}}",{{#target_list}}
"target_list": "{{target_list}}",{{/target_list}}{{#product_group_id}}
"product_group_id": {{product_group_id}},{{/product_group_id}}{{#input_group_locator}}
"input_group_locator": "{{input_group_locator}}",{{/input_group_locator}}
"projectMetadata": {
"telescope": "{{telescope}}",
"projectCode": "{{projectCode}}"
},
"file_list": "{{#file_list}}{{.}},{{/file_list}}"
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment