fix: lint
This commit is contained in:
parent
bfcefa0217
commit
e34f503674
@ -17,13 +17,13 @@
|
|||||||
package caldav
|
package caldav
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"code.vikunja.io/api/pkg/db"
|
|
||||||
"errors"
|
"errors"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"code.vikunja.io/api/pkg/config"
|
"code.vikunja.io/api/pkg/config"
|
||||||
|
"code.vikunja.io/api/pkg/db"
|
||||||
"code.vikunja.io/api/pkg/log"
|
"code.vikunja.io/api/pkg/log"
|
||||||
"code.vikunja.io/api/pkg/models"
|
"code.vikunja.io/api/pkg/models"
|
||||||
"code.vikunja.io/api/pkg/utils"
|
"code.vikunja.io/api/pkg/utils"
|
||||||
@ -91,11 +91,11 @@ func ParseTaskFromVTODO(content string) (vTask *models.Task, err error) {
|
|||||||
}
|
}
|
||||||
// We put the vTodo details in a map to be able to handle them more easily
|
// We put the vTodo details in a map to be able to handle them more easily
|
||||||
task := make(map[string]ics.IANAProperty)
|
task := make(map[string]ics.IANAProperty)
|
||||||
var relation *ics.IANAProperty
|
var relation ics.IANAProperty
|
||||||
for _, c := range vTodo.UnknownPropertiesIANAProperties() {
|
for _, c := range vTodo.UnknownPropertiesIANAProperties() {
|
||||||
task[c.IANAToken] = c
|
task[c.IANAToken] = c
|
||||||
if strings.HasPrefix(c.IANAToken, "RELATED-TO") {
|
if strings.HasPrefix(c.IANAToken, "RELATED-TO") {
|
||||||
relation = &c
|
relation = c
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -139,7 +139,7 @@ func ParseTaskFromVTODO(content string) (vTask *models.Task, err error) {
|
|||||||
DoneAt: caldavTimeToTimestamp(task["COMPLETED"]),
|
DoneAt: caldavTimeToTimestamp(task["COMPLETED"]),
|
||||||
}
|
}
|
||||||
|
|
||||||
if relation != nil {
|
if relation.Value != "" {
|
||||||
s := db.NewSession()
|
s := db.NewSession()
|
||||||
defer s.Close()
|
defer s.Close()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user