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

Regression: Adjusting Assets does not have an effect #1209

Closed
constantinius opened this issue Aug 25, 2023 · 2 comments
Closed

Regression: Adjusting Assets does not have an effect #1209

constantinius opened this issue Aug 25, 2023 · 2 comments

Comments

@constantinius
Copy link

In the stactools-datacube package we extend an Item like this:

    asset = item.get_assets()[asset_name]
    datacube = extend_asset(item, asset, rtol)

This used to work, but with pystac==1.8.3 this results in an empty asset. When explicitly re-adding the asset it works again:

    asset = item.get_assets()[asset_name]
    datacube = extend_asset(item, asset)
    item.add_asset(asset_name, asset)

Is it now required to re-add the asset to the item to trigger the update?

@gadomski
Copy link
Member

I'd access the assets dictionary directly if you want to modify it:

asset = item.assets[asset_name]

The behavior of get_assets was intentionally changed in #1087.

@constantinius
Copy link
Author

Thanks @gadomski, will fix this in stactools-datacube

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants