fix: make sure labels are always exported as caldav
Some checks failed
continuous-integration/drone/pr Build is failing
Some checks failed
continuous-integration/drone/pr Build is failing
Labels were not added to tasks for requests like /dav/lists/{listId}/{taskId}
This commit is contained in:
parent
53197b85e3
commit
ea0a62fbe2
|
@ -548,6 +548,19 @@ func GetTaskSimple(s *xorm.Session, t *Task) (task Task, err error) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetTask returns a task with extra data
|
||||||
|
func GetTask(s *xorm.Session, t *Task, a web.Auth) (task Task, err error) {
|
||||||
|
task = *t
|
||||||
|
task, err = GetTaskSimple(s, t)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
taskMap := make(map[int64]*Task, 1)
|
||||||
|
taskMap[task.ID] = &task
|
||||||
|
err = addMoreInfoToTasks(s, taskMap, a)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// GetTasksByIDs returns all tasks for a list of ids
|
// GetTasksByIDs returns all tasks for a list of ids
|
||||||
func (bt *BulkTask) GetTasksByIDs(s *xorm.Session) (err error) {
|
func (bt *BulkTask) GetTasksByIDs(s *xorm.Session) (err error) {
|
||||||
for _, id := range bt.IDs {
|
for _, id := range bt.IDs {
|
||||||
|
|
|
@ -210,7 +210,7 @@ func (vcls *VikunjaCaldavListStorage) GetResource(rpath string) (*data.Resource,
|
||||||
|
|
||||||
// save and override the updated unix date to not break any later etag checks
|
// save and override the updated unix date to not break any later etag checks
|
||||||
updated := vcls.task.Updated
|
updated := vcls.task.Updated
|
||||||
task, err := models.GetTaskSimple(s, &models.Task{ID: vcls.task.ID, UID: vcls.task.UID})
|
task, err := models.GetTask(s, &models.Task{ID: vcls.task.ID, UID: vcls.task.UID}, vcls.user)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
_ = s.Rollback()
|
_ = s.Rollback()
|
||||||
if models.IsErrTaskDoesNotExist(err) {
|
if models.IsErrTaskDoesNotExist(err) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user