fix(task): don't try to return a project identifier if there is no project

This commit is contained in:
kolaente 2023-06-07 20:29:35 +02:00
parent 7755b9cd49
commit e66344c21e
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 5 additions and 0 deletions

View File

@ -579,6 +579,11 @@ func getRemindersForTasks(s *xorm.Session, taskIDs []int64) (reminders []*TaskRe
}
func (t *Task) setIdentifier(project *Project) {
if project == nil {
t.Identifier = "#" + strconv.FormatInt(t.Index, 10)
return
}
t.Identifier = project.Identifier + "-" + strconv.FormatInt(t.Index, 10)
}