Skip to content
Merged
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion dags/veda_data_pipeline/groups/processing_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def remove_thumbnail_asset(ti):
if assets.get("thumbnail"):
assets.pop("thumbnail")
# if thumbnail was only asset, delete assets
if not assets:
if not assets and (assets is not None):
Copy link
Contributor

@anayeaye anayeaye Jan 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to update line 24 too, so that we can test if assets exists

assets = payload.get("assets", {}) should be assets = payload.get("assets", None)

EDIT
I think having an assets key at all is a problem for the existing pipeline because the pipeline and stac schemas have conflicting assets meanings--so this level of logic about other non-thumbnail assets seems unhelpful. @ividito @botanical should we just check if assets is in payload.keys() and then if it is payload.pop("assets")?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that the current logic is awkward. I also think we should just pop the assets from the payload.

payload.pop("assets")
return payload

Expand Down