This commit is contained in:
@@ -661,6 +661,12 @@ def payment_finish(request):
|
||||
notify_user_order_paid(order)
|
||||
except Exception as e:
|
||||
print(f"发送短信通知失败: {str(e)}")
|
||||
else:
|
||||
# 额外保险:如果是活动订单,手动标记不触发 signals 中的支付/发货通知
|
||||
# 因为 signals 可能会在 save() 时触发
|
||||
order._was_paid = False
|
||||
order._was_shipped = False
|
||||
# order.save() # 不需要再 save,因为已经是 post-save 或者不影响数据库的标记
|
||||
|
||||
except Exception as e:
|
||||
print(f"订单更新失败: {str(e)}")
|
||||
|
||||
Reference in New Issue
Block a user