Skip to content

Commit 54c4241

Browse files
committed
chore:review optimize
1 parent 12b6fcd commit 54c4241

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

sqle/model/audit_plan.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@ func (s *Storage) GetBlacklistList(projectID ProjectUID, FilterType BlacklistFil
109109
if err != nil {
110110
return blackListAPS, uint64(count), errors.New(errors.ConnectStorageError, err)
111111
}
112+
113+
if count == 0 {
114+
return blackListAPS, uint64(count), errors.New(errors.ConnectStorageError, err)
115+
}
116+
112117
err = query.Offset(int((pageIndex - 1) * pageSize)).Limit(int(pageSize)).Order("id desc").Find(&blackListAPS).Error
113118
return blackListAPS, uint64(count), errors.New(errors.ConnectStorageError, err)
114119
}

0 commit comments

Comments
 (0)