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

Initialize ExportData with tmp config obj from AggregatedData. #626

Merged
Merged
Changes from all commits
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
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