From cb7e30bb64945dfbd8288a20156f09c97a052075 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期六, 25 十一月 2023 17:45:18 +0800
Subject: [PATCH] fix

---
 api/v1/task.go |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/api/v1/task.go b/api/v1/task.go
index d65ab6c..afe8397 100644
--- a/api/v1/task.go
+++ b/api/v1/task.go
@@ -285,7 +285,7 @@
 
 	var processModelNumber string
 	plcConfig, code := service.NewDevicePlcService().GetDevicePlc()
-	if code == ecode.OK && plcConfig.ID != 0 {
+	if code == ecode.OK && plcConfig.ID != 0 && len(plcConfig.Details) > 0 {
 		plcConfig.MaxTryTimes = 2
 		device, err := service.GetCurrentDevice()
 		if err != nil {

--
Gitblit v1.8.0