Skip to content

Commit

Permalink
Update dags/veda_data_pipeline/veda_dataset_pipeline.py
Browse files Browse the repository at this point in the history
Co-authored-by: Alexandra Kirk <alexandra@developmentseed.org>
  • Loading branch information
ividito and anayeaye committed Dec 3, 2024
1 parent 9d7c611 commit 3a48975
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dags/veda_data_pipeline/veda_dataset_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,15 @@ def mutate_payload(**kwargs):
ti = kwargs.get("ti")
payload = ti.dag_run.conf
if assets := payload.get("assets"):
# is first key thumbnail
# remove thumbnail asset if provided in collection config
if "thumbnail" in assets.keys():
assets.pop("thumbnail")
# if thumbnail was only asset, delete assets
if not assets:
payload.pop("assets")
# finally put the mutated assets back in the payload
else:
payload["assets"] = assets
return payload


Expand Down

0 comments on commit 3a48975

Please sign in to comment.