Skip to content

Commit

Permalink
Do not even try to upload sesimic data that does not have data.vertic…
Browse files Browse the repository at this point in the history
…al_domain.
  • Loading branch information
rwiker committed Nov 22, 2024
1 parent 35f03a2 commit b6ef9b5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions src/fmu/sumo/uploader/_sumofile.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,15 @@ def upload_to_sumo(self, sumo_parent_id, sumoclient, sumo_mode):
and self.metadata.get("data").get("format") in ["openvds", "segy"]
):
self.metadata["data"]["format"] = "openvds"
if "vertical_domain" not in self.metadata["data"]:
result.update(
{
"status": "rejected",
"metadata_upload_response_status_code": 500,
"metadata_upload_response_text": "File upload cannot be attempted; seismic data does not have a value for data.vertical_domain."
}
)
return result

try:
response = self._upload_metadata(
Expand Down
2 changes: 1 addition & 1 deletion tests/data/test_case_080/.surface.bin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ fmu:
anything: something
file:
relative_path: realization-33/iter-0/share/results/maps/volantis_gp_base--amplitude.gri
absolute_path: /some/absolute/path//realization-33/iter-0/share/results/maps/volantis_gp_base--amplitude.gri
absolute_path: /Users/RAYW/devel/sumo-repos/tmp/fmu-sumo-uploader/tests/data/test_case_080/.surface.bin.yml
checksum_md5: kjhsdfvsdlfk23knerknvk23
data:
name: volantis_top-volantis_base
Expand Down
2 changes: 1 addition & 1 deletion tests/data/test_case_080/case.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class: case
fmu:
case:
name: TestCase from fmu.sumo
uuid: 11111111-1111-1111-1111-111111111111
uuid: fdb40fac-d654-4b23-b4c1-9229f0fd805e
user:
id: testuser
description:
Expand Down

0 comments on commit b6ef9b5

Please sign in to comment.