From 5d1e8efcae344205529da5c328e551c56a7f2300 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristiano=20K=C3=B6hler?= <42555442+kohlerca@users.noreply.github.com> Date: Sat, 26 Oct 2024 18:12:52 +0200 Subject: [PATCH] Use value to check for duplicate metadata property in the visualization graph (#30) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cristiano Köhler --- alpaca/graph.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alpaca/graph.py b/alpaca/graph.py index 198e366..d427382 100644 --- a/alpaca/graph.py +++ b/alpaca/graph.py @@ -84,7 +84,7 @@ def _add_attribute(data, attr_name, attr_type, attr_value, strip_namespace): if not strip_namespace: attr_name = f"{ATTR_NAMES[attr_type]}:{attr_name}" - if attr_name in data: + if attr_name in data and data[attr_name] != attr_value: raise ValueError( "Duplicate property values. Make sure to include the namespaces!") data[attr_name] = attr_value