From 0a0312b92ba08ec85a872b110796233690dc43ad Mon Sep 17 00:00:00 2001 From: Caroline Reis Date: Mon, 30 Jan 2023 01:01:02 -0300 Subject: [PATCH] It fixed the bug when getting INDIRECT_get_class_properties with Inverse properties Signed-off-by: Caroline Reis --- entity.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/entity.py b/entity.py index 713c248..a16c090 100644 --- a/entity.py +++ b/entity.py @@ -507,9 +507,9 @@ def get_class_properties(Class): def INDIRECT_get_class_properties(Class): l = set() for r in _inherited_properties_value_restrictions(Class, None, set()): - if r.property._class_property_some and ((r.type == VALUE) or (r.type == SOME) or ((r.type == EXACTLY) and r.cardinality >= 1) or ((r.type == MIN) and r.cardinality >= 1)): + if getattr(r.property, "_class_property_some", False) and ((r.type == VALUE) or (r.type == SOME) or ((r.type == EXACTLY) and r.cardinality >= 1) or ((r.type == MIN) and r.cardinality >= 1)): l.add(r.property) - elif r.property._class_property_only and (r.type == ONLY): + elif getattr(r.property, "_class_property_only", False) and (r.type == ONLY): l.add(r.property) for storid in Class.namespace.world._get_triples_s_p(Class.storid):