Allow Collections without links

This commit is contained in:
uclaros 2025-06-12 14:39:52 +03:00 committed by Nyall Dawson
parent 90fdc28320
commit 279792e2f8

View File

@ -522,7 +522,9 @@ QgsStacCollectionList *QgsStacParser::collections()
try
{
links = parseLinks( mData.at( "links" ) );
// some servers don't include links here, let's be more forgiving
if ( mData.contains( "links" ) )
links = parseLinks( mData.at( "links" ) );
cols.reserve( mData.at( "collections" ).size() );
for ( auto &col : mData.at( "collections" ) )