forked from vikunja/vikunja
fix(typesense): don't try to index tasks if there are none
This commit is contained in:
parent
38a3a5c6e8
commit
054f21821c
|
@ -243,6 +243,12 @@ func ReindexAllTasks() (err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func reindexTasks(s *xorm.Session, tasks map[int64]*Task) (err error) {
|
func reindexTasks(s *xorm.Session, tasks map[int64]*Task) (err error) {
|
||||||
|
|
||||||
|
if len(tasks) == 0 {
|
||||||
|
log.Infof("No tasks to index")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
err = addMoreInfoToTasks(s, tasks, &user.User{ID: 1})
|
err = addMoreInfoToTasks(s, tasks, &user.User{ID: 1})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("could not fetch more task info: %s", err.Error())
|
return fmt.Errorf("could not fetch more task info: %s", err.Error())
|
||||||
|
|
Loading…
Reference in New Issue