Skip to content

Commit 12ff4cc

Browse files
issue
1 parent 9089deb commit 12ff4cc

File tree

1 file changed

+13
-13
lines changed
  • backend/src/backend/user_session/routers/surface

1 file changed

+13
-13
lines changed

backend/src/backend/user_session/routers/surface/router.py

+13-13
Original file line numberDiff line numberDiff line change
@@ -92,19 +92,19 @@ async def well_intersection_reals_from_user_session(
9292
else:
9393
surfaces.append(possible_surface)
9494
elapsed_cache = timer.lap_ms()
95-
96-
# Download remaining
97-
data_map_b64 = go_get_surface_blobs(authenticated_user.get_sumo_access_token(), case_uuid, uuids_to_download)
98-
elapsed_download = timer.lap_ms()
99-
100-
# Convert to xtgeo
101-
downloaded_surface_dict = await b64_to_xtgeo(data_map_b64)
102-
elapsed_xtgeo = timer.lap_ms()
103-
104-
# Add to cache
105-
for uuid, surface in downloaded_surface_dict.items():
106-
await cache.set(f"{authenticated_user._user_id}-{uuid}", surface)
107-
surfaces.append(surface)
95+
if uuids_to_download:
96+
# Download remaining
97+
data_map_b64 = go_get_surface_blobs(authenticated_user.get_sumo_access_token(), case_uuid, uuids_to_download)
98+
elapsed_download = timer.lap_ms()
99+
100+
# Convert to xtgeo
101+
downloaded_surface_dict = await b64_to_xtgeo(data_map_b64)
102+
elapsed_xtgeo = timer.lap_ms()
103+
104+
# Add to cache
105+
for uuid, surface in downloaded_surface_dict.items():
106+
await cache.set(f"{authenticated_user._user_id}-{uuid}", surface)
107+
surfaces.append(surface)
108108

109109
# Intersect
110110
fence_arr = np.array(

0 commit comments

Comments
 (0)