saleor/saleor

TypeError: 'NoneType' object is not iterable

开放

#17,891 创建于 2025年6月30日

 (3 条评论) (0 个反应) (0 位负责人)Python (5,278 个派生)batch import
bughelp wanted

仓库指标

星标
 (19,887 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

There is an issue when the webhook doesn't respond, and the paymentGatewayInitialize mutation receives the following variables in the prepare_response method:

payment_gateways_input = [PaymentGatewayData(app_identifier='saleor.app.payment.stripe', data=None, error=None)]
payment_gateways_response = None

This results in the mutation failing with the following exception:

TypeError: 'NoneType' object is not iterable
(1 additional frame(s) were not displayed)
...
  File "saleor/graphql/core/mutations.py", line 521, in mutate
    response = cls.perform_mutation(root, info, **data)
  File "saleor/graphql/payment/mutations/transaction/payment_gateway_initialize.py", line 149, in perform_mutation
    gateway_configs=cls.prepare_response(payment_gateways_data, response_data),
  File "saleor/graphql/payment/mutations/transaction/payment_gateway_initialize.py", line 81, in prepare_response
    gateway.app_identifier: gateway for gateway in payment_gateways_response

A query failed unexpectedly

First seen in 3.22.0-a.0.

Internal Sentry issue: SALEOR-CORE-6GE

贡献者指南