Selaa lähdekoodia

修复移动失败

kobe6258 3 viikkoa sitten
vanhempi
commit
43c81b2ee0
1 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. 2 1
      services/speech_recognition.go

+ 2 - 1
services/speech_recognition.go

@@ -333,7 +333,8 @@ func MoveSpeechMenu(req speech_recognition.SpeechRecognitionMenuMoveReq) (err er
 				err = fmt.Errorf("获取父级目录下的同名目录失败, Err: %s", e.Error())
 				return
 			}
-			if exists != nil {
+			if exists != nil && exists.SpeechRecognitionMenuId > 0 {
+				err = fmt.Errorf("移动失败,目录名称已存在")
 				errMsg = "移动失败,目录名称已存在"
 				return
 			}