zwxi 11 months ago
parent
commit
26221d7932
1 changed files with 2 additions and 2 deletions
  1. 2 2
      controllers/smart_report/smart_report.go

+ 2 - 2
controllers/smart_report/smart_report.go

@@ -391,7 +391,7 @@ func (this *SmartReportController) Detail() {
 	resp := smart_report.FormatSmartReport2Item(item)
 	if resp.HeadResourceId > 0 {
 		headResource, err := smart_report.GetResourceItemById(resp.HeadResourceId)
-		if err == nil {
+		if err != nil {
 			br.Msg = "操作失败"
 			br.ErrMsg = "获取资源库版头失败, Err: " + e.Error()
 			return
@@ -402,7 +402,7 @@ func (this *SmartReportController) Detail() {
 
 	if resp.EndResourceId > 0 {
 		endResource, err := smart_report.GetResourceItemById(resp.EndResourceId)
-		if err == nil {
+		if err != nil {
 			br.Msg = "操作失败"
 			br.ErrMsg = "获取资源库版头失败, Err: " + e.Error()
 			return