rambo преди 3 месеца
родител
ревизия
42f8663466
променени са 1 файла, в които са добавени 8 реда и са изтрити 7 реда
  1. 8 7
      python/custom_plugins/plugins/detail_template/huilima/detail_huilima4.py

+ 8 - 7
python/custom_plugins/plugins/detail_template/huilima/detail_huilima4.py

@@ -167,13 +167,14 @@ class DetailPicGet(DetailBase):
             text = self.get_text_value(text_data["text"])
             text = self.get_text_value(text_data["text"])
             if not text:
             if not text:
                 text = text_data["default"]
                 text = text_data["default"]
-            _pp = PictureProcessing().get_text_image_advanced(
-                font=font_1,
-                text=text,
-                fill=(0, 0, 0),
-                return_mode="min_image",
-            )
-            pp_bg_2 = pp_bg_2.paste_img(top_img=_pp, value=text_data["pos"], base="nw")
+            if text:
+                _pp = PictureProcessing().get_text_image_advanced(
+                    font=font_1,
+                    text=text,
+                    fill=(0, 0, 0),
+                    return_mode="min_image",
+                )
+                pp_bg_2 = pp_bg_2.paste_img(top_img=_pp, value=text_data["pos"], base="nw")
         detailed_images.append(pp_bg_2)
         detailed_images.append(pp_bg_2)
 
 
         return PictureProcessing(im=self.add_pic(detailed_images))
         return PictureProcessing(im=self.add_pic(detailed_images))