Skip to content

Commit

Permalink
BUG: Initialize ExportData with tmp config obj from AggregatedData. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
perolavsvendsen authored Apr 23, 2024
1 parent a6bb20c commit 74a5d6f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/fmu/dataio/aggregation.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,17 @@ def _generate_aggrd_metadata(

# next, the new object will trigger update of: 'file', 'data' (some fields) and
# 'tracklog'.

# Get content and make a temporary config from template to be allowed to
# initialize a temporary ExportData without warnings so that we can get to the
# objectdata_provider
content = template["data"]["content"]
etemp = dataio.ExportData(name=self.name, content=content)
config = {
"access": template["access"],
"masterdata": template["masterdata"],
"model": template["fmu"]["model"],
}
etemp = dataio.ExportData(config=config, name=self.name, content=content)
objdata = objectdata_provider_factory(obj=obj, dataio=etemp).get_objectdata()

template["tracklog"] = [generate_meta_tracklog()[0].model_dump(mode="json")]
Expand Down

0 comments on commit 74a5d6f

Please sign in to comment.