yf_yzl преди 2 години
родител
ревизия
59d155f334
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      smartfarming/api/views/forecast/forecast_system.py

+ 2 - 2
smartfarming/api/views/forecast/forecast_system.py

@@ -224,12 +224,12 @@ def device_photo_list(request):
             pest_counts = sum([int(i.split(",")[1]) for i in indentify_result.split("#")]) if indentify_result else 0
 
         # TODO 展示图片暂时处理
-        if str(i.addr).startswith('/'):
+        if str(i.addr).startswith('http'):
             img_url = image_path + i.addr
         else:
             img_url = image_path + "/" + i.addr
 
-        if str(i.indentify_photo).startswith('/'):
+        if str(i.indentify_photo).startswith('http'):
             indentify_photo = image_path + i.indentify_photo
         else:
             indentify_photo = image_path + "/" + i.indentify_photo