File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -77,15 +77,21 @@ def init_dag(app: FastAPI) -> None:
7777
7878 # update eodag collections config from external stac collections
7979 collections = {}
80+ status = {}
8081 for c in dag .list_collections ():
8182 if ext_coll := ext_stac_collections .get (c .id ):
8283 collection = ext_coll
8384 collection ["id" ] = c ._id
8485 collection ["alias" ] = c .id
86+ if federation := collection .pop ("federation" , None ):
87+ status [c ._id ] = federation
8588 collections [c ._id ] = collection
8689
8790 dag .db .upsert_collections (CollectionsDict .from_configs (collections ))
8891
92+ # store status in a separate column to avoid federation to be overwritten by subsequent upsert_collections() calls
93+ dag .db .set_status (status )
94+
8995 # pre-build search plugins
9096 for provider in dag .providers :
9197 next (dag ._plugins_manager .get_search_plugins (provider = provider ))
You can’t perform that action at this time.
0 commit comments