def _get_backends(self, user):
        """
        Get the correct backend(s) for this notification.
        Only backends that validate (all required settings are available) apply.
        """

        from notifications.models import DisabledNotificationsTypeBackend

        disabled_backends = []

        try:
            disabled_backends = DisabledNotificationsTypeBackend.objects.get(user=user, notification_type=self.__class__.__name__).get_backends()
        except DisabledNotificationsTypeBackend.DoesNotExist:
            pass

        backends = {}
        for backend_name in self.allowed_backends:
            if disabled_backends not in backend_name:
                subject = self.get_subject(backend_name, user)
                text = self.get_text(backend_name, user)
                send_at = self.get_send_at(backend_name, user)
                backend = self._all_backends[backend_name](user=user, subject=subject, text=text, send_at=send_at)
                if backend.is_registered() and backend.validate():
                    backends[backend_name] = backend

        if not backends and not notification_settings.FAIL_SILENT:
            raise BackendError('Could not find a backend for this notification')

        return backends
dataset/ETHPy150Open kevinrenskers/django-generic-notifications/notifications/type/__init__.py/BaseNotification._get_backends/swapped operands of `not in`