diff --git a/bin/lib/correlations_engine.py b/bin/lib/correlations_engine.py index d1d7e3b6..bf234c9c 100755 --- a/bin/lib/correlations_engine.py +++ b/bin/lib/correlations_engine.py @@ -193,7 +193,7 @@ def _get_correlations_graph_node(links, nodes, obj_type, subtype, obj_id, level, if obj2_str_id == previous_str_obj: continue - if len(nodes) > max_nodes: + if len(nodes) > max_nodes != 0: break nodes.add(obj2_str_id) links.add((obj_str_id, obj2_str_id)) diff --git a/var/www/blueprints/correlation.py b/var/www/blueprints/correlation.py index b43cfe1e..bcf61729 100644 --- a/var/www/blueprints/correlation.py +++ b/var/www/blueprints/correlation.py @@ -46,7 +46,7 @@ def sanitise_graph_mode(graph_mode): def sanitise_nb_max_nodes(nb_max_nodes): try: nb_max_nodes = int(nb_max_nodes) - if nb_max_nodes < 2: + if nb_max_nodes < 2 and nb_max_nodes != 0: nb_max_nodes = 300 except (TypeError, ValueError): nb_max_nodes = 300 diff --git a/var/www/templates/correlation/show_correlation.html b/var/www/templates/correlation/show_correlation.html index 667d0cb8..93ca5c2b 100644 --- a/var/www/templates/correlation/show_correlation.html +++ b/var/www/templates/correlation/show_correlation.html @@ -256,7 +256,7 @@