Commit 80d6da2b authored by Noé Gaumont's avatar Noé Gaumont 🐙
Browse files

[py3] Fix comparison of cardinality when maxvalue is graph_nodes.INFINITY

parent 5540a7d2b2e0
Pipeline #22156 passed with stage
in 26 minutes and 8 seconds
......@@ -134,9 +134,11 @@ def integrity_cardinality(data_object):
minc, maxc = minmax_cardinality(parent_cardinality)
minvalue = min(minc, minvalue)
if maxc == graph_nodes.INFINITY or maxvalue == graph_nodes.INFINITY:
maxvalue = 'n'
maxvalue = graph_nodes.INFINITY
else:
maxvalue = max(maxc, maxvalue)
if maxvalue == graph_nodes.INFINITY:
maxvalue = 'n'
if minvalue == maxvalue == 1:
return '1'
return '{}..{}'.format(minvalue, maxvalue)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment