Skip to content

Commit 64439c8

Browse files
committed
reduce delta
1 parent 2508e16 commit 64439c8

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

src/opengeodeweb_back/routes/blueprint_routes.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -621,16 +621,11 @@ def import_project() -> flask.Response:
621621
for data in rows:
622622
data_path = geode_functions.data_file_path(data.id)
623623
viewable_name = data.viewable_file
624-
viewable_directory = os.path.join(data_path, "viewable")
625-
has_component_viewables = os.path.isdir(viewable_directory) and bool(
626-
os.listdir(viewable_directory)
627-
)
628-
629624
if viewable_name:
630-
viewable_path = geode_functions.data_file_path(data.id, viewable_name)
631-
if os.path.isfile(viewable_path) and (
632-
data.viewer_object != "model" or has_component_viewables
633-
):
625+
vpath = geode_functions.data_file_path(data.id, viewable_name)
626+
viewable_dir = os.path.join(data_path, "viewable")
627+
has_components = os.path.isdir(viewable_dir) and bool(os.listdir(viewable_dir))
628+
if os.path.isfile(vpath) and (data.viewer_object != "model" or has_components):
634629
continue
635630

636631
native_file = str(data.native_file or "")

0 commit comments

Comments
 (0)