File tree Expand file tree Collapse file tree
src/opengeodeweb_back/routes Expand file tree Collapse file tree Original file line number Diff line number Diff 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 "" )
You can’t perform that action at this time.
0 commit comments