Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubes
seda
Commits
f9706bd3f1f3
Commit
80d6da2b
authored
Nov 25, 2020
by
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
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
cubicweb_seda/entities/profile_generation.py
View file @
f9706bd3
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment