def allow_relation(self, obj1, obj2, **hints):  # type: ignore[no-untyped-def]
        """
        Relations between objects are allowed if both objects are
        in the analytics database.
        """
        if (
            obj1._meta.app_label in self.route_app_labels
            and obj2._meta.app_label in self.route_app_labels
        ):
            return True
        return None

        Relations between objects are allowed if both objects are
        in the analytics database.
        
api/app/routers.py