From 7e93dc3da3a55889d032fd8f210907ca400305ce Mon Sep 17 00:00:00 2001 From: Jason Robinson Date: Sun, 8 Sep 2019 02:03:51 +0300 Subject: [PATCH] Fix _allowed_children check --- federation/entities/mixins.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/federation/entities/mixins.py b/federation/entities/mixins.py index 8adb9ad..9dc8267 100644 --- a/federation/entities/mixins.py +++ b/federation/entities/mixins.py @@ -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__