Add copying task comments
This commit is contained in:
parent
28a4944dd3
commit
01d1c8f6e9
|
@ -157,12 +157,24 @@ func (ld *ListDuplicate) Create(a web.Auth) (err error) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// * comments
|
// Comments
|
||||||
// * relations in that list
|
comments := []*TaskComment{}
|
||||||
// * reminders
|
err = x.In("task_id", oldTaskIDs).Find(&comments)
|
||||||
// * Background files + unsplash info
|
if err != nil {
|
||||||
|
return
|
||||||
// * rights / shares
|
}
|
||||||
// * Generate new link shares if any are available
|
for _, c := range comments {
|
||||||
|
c.TaskID = taskMap[c.TaskID]
|
||||||
|
if _, err := x.Insert(c); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Relations in that list
|
||||||
|
// Reminders
|
||||||
|
// Background files + unsplash info
|
||||||
|
|
||||||
|
// Rights / Shares
|
||||||
|
// Generate new link shares if any are available
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user