소스 검색

```
fix(customer-template-service): 修复图片处理逻辑中的条件判断

- 将 `model_image is None` 改为 `not model_image` 以正确处理空值情况
- 将 `scene_image is None` 改为 `not scene_image` 以正确处理空值情况
- 确保当图片变量为空时能正确执行图片路径赋值和复制操作
```

rambo 3 주 전
부모
커밋
2d7110761f
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      python/service/customer_template_service.py

+ 2 - 2
python/service/customer_template_service.py

@@ -219,12 +219,12 @@ class CustomerTemplateService:
             goods_art_no = product.get("货号",None)
             goods_art_lens = len(new_config_data.get("货号资料", []))
             concat_shuffix = "" if goods_art_lens == 1 else f"_{goods_art_no}"
-            if model_image is None:
+            if not model_image:
                 model_image_path = product.get("模特图", None)
                 if model_image_path:
                     model_image = model_image_path
                     self.copyImage(model_image_path, f"{scp_path}/模特图{concat_shuffix}.jpg")
-            if scene_image  is None:
+            if not scene_image:
                 scene_image_path = product.get("场景图", None)
                 if scene_image_path:
                     scene_image = scene_image_path