Skip to content

Commit e0e7d39

Browse files
committed
fixed repo find topics
1 parent 3311183 commit e0e7d39

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

models/topic.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ func FindTopics(opts *FindTopicOptions) (topics []*Topic, err error) {
171171
if opts.RepoID > 0 {
172172
sess.Join("INNER", "repo_topic", "repo_topic.topic_id = topic.id")
173173
}
174-
if opts.PageSize != 0 {
174+
if opts.PageSize != 0 && opts.Page != 0 {
175175
sess = opts.setSessionPagination(sess)
176176
}
177177
return topics, sess.Desc("topic.repo_count").Find(&topics)

0 commit comments

Comments
 (0)