Allow to compare simple type instance to underlying type

This commit is contained in:
Thomas Krijnen
2026-06-25 13:35:08 +02:00
parent f60a3423d0
commit 262b55630c
@@ -443,7 +443,10 @@ class entity_instance:
def __eq__(self, other: entity_instance) -> bool:
if not isinstance(self, type(other)):
return False
if not self.is_entity():
return self[0] == other
else:
return False
elif None in (self.wrapped_data.file, other.wrapped_data.file):
# when not added to a file, we can only compare attribute values
# and we need this for where rule evaluation