mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-21 06:09:39 +08:00
bugfix mem paginate
通过totoal和offset 与limit比较确定最后返回数据
This commit is contained in:
@@ -739,7 +739,7 @@ func calculateListResult(data []jsonutils.JSONObject, total, limit, offset int64
|
||||
}
|
||||
}
|
||||
// do limit
|
||||
if limit > 0 && total > limit {
|
||||
if limit > 0 && total-offset > limit {
|
||||
data = data[:limit]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user