Fix _allowed_children check

merge-requests/157/merge
Jason Robinson 2019-09-08 02:03:51 +03:00
rodzic c997a1a2b4
commit 7e93dc3da3
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -104,7 +104,7 @@ class BaseEntity:
def _validate_children(self):
"""Check that the children we have are allowed here."""
for child in self._children:
if child.__class__ not in self._allowed_children:
if not isinstance(child, self._allowed_children):
raise ValueError(
"Child %s is not allowed as a children for this %s type entity." % (
child, self.__class__