Skip to content

Commit e7df16f

Browse files
Apply suggestion from @BotellaA
Co-authored-by: Arnaud Botella <[email protected]>
1 parent df05400 commit e7df16f

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

src/opengeodeweb_back/geode_functions.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -189,23 +189,6 @@ def list_geode_objects(
189189
if has_creator(geode_object, file_extension):
190190
loadability_score = is_loadable(geode_object, file_absolute_path)
191191
return_dict[geode_object] = {"is_loadable": loadability_score}
192-
if return_dict:
193-
max_loadability_score = max(
194-
obj_info["is_loadable"] for obj_info in return_dict.values()
195-
)
196-
best_objects = {
197-
object_name: object_info
198-
for object_name, object_info in return_dict.items()
199-
if object_info["is_loadable"] == max_loadability_score
200-
}
201-
if len(best_objects) > 1:
202-
best_object_name = max(
203-
best_objects,
204-
key=lambda name: object_priority(name, file_absolute_path),
205-
)
206-
return {best_object_name: return_dict[best_object_name]}
207-
else:
208-
return best_objects
209192
return return_dict
210193

211194

0 commit comments

Comments
 (0)