Skip to content

Commit

Permalink
bugfix mem paginate
Browse files Browse the repository at this point in the history
通过totoal和offset 与limit比较确定最后返回数据
  • Loading branch information
zhaoxiangchun committed May 7, 2020
1 parent 618e721 commit d874b52
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/cloudcommon/db/db_dispatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,8 @@ func calculateListResult(data []jsonutils.JSONObject, total, limit, offset int64
// do limit
if limit > 0 && total-offset > limit {
data = data[:limit]
} else {
data = data[:total-offset]
}
}

Expand Down

0 comments on commit d874b52

Please sign in to comment.