Skip to content

Commit f4b6941

Browse files
feat(output_factory): update get_output_factory
1 parent a83014e commit f4b6941

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

src/opengeodeweb_back/geode_functions.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,13 @@ def get_input_factory(geode_object: str):
2121

2222

2323
def get_output_factory(geode_object: str):
24-
return objects_list()[geode_object]["output_factory"]
24+
output_factory = objects_list()[geode_object]["output_factory"]
25+
if "parent" in objects_list()[geode_object].keys():
26+
parent = objects_list()[geode_object]["parent"]
27+
parent_output_factory = get_output_factory(parent)
28+
return [output_factory, parent_output_factory]
29+
else:
30+
return [output_factory]
2531

2632

2733
def missing_files(geode_object: str, file_absolute_path: str):

src/opengeodeweb_back/geode_objects.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ def objects_list():
2929
"CrossSection": {
3030
"parent": "Section",
3131
"input_factory": og_gs.CrossSectionInputFactory,
32-
"output_factory":
33-
og_gs.CrossSectionOutputFactory,
34-
,
32+
"output_factory": og_gs.CrossSectionOutputFactory,
3533
"missing_files": og_gs.check_cross_section_missing_files,
3634
"load": og_gs.load_cross_section,
3735
"save": og_gs.save_cross_section,
@@ -279,9 +277,7 @@ def objects_list():
279277
"StructuralModel": {
280278
"parent": "BRep",
281279
"input_factory": og_gs.StructuralModelInputFactory,
282-
"output_factory":
283-
og_gs.StructuralModelOutputFactory,
284-
,
280+
"output_factory": og_gs.StructuralModelOutputFactory,
285281
"missing_files": og_gs.check_structural_model_missing_files,
286282
"load": og_gs.load_structural_model,
287283
"save": og_gs.save_structural_model,

0 commit comments

Comments
 (0)