Fix task index db
continuous-integration/drone/pr Build is failing Details

This commit is contained in:
kolaente 2019-12-07 22:28:47 +01:00
parent 828a166c99
commit ea372628ad
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 2 additions and 2 deletions

View File

@ -66,7 +66,7 @@ type Task struct {
// The task identifier, based on the list identifier and the task's index
Identifier string `xorm:"-" json:"identifier"`
// The task index, calculated per list
Index int64 `xorm:"int(11) not null 0" json:"index"`
Index int64 `xorm:"int(11) not null default 0" json:"index"`
// The UID is currently not used for anything other than caldav, which is why we don't expose it over json
UID string `xorm:"varchar(250) null" json:"-"`
@ -790,7 +790,7 @@ func (t *Task) Delete() (err error) {
// @Success 200 {object} models.Task "The task"
// @Failure 404 {object} models.Message "Task not found"
// @Failure 500 {object} models.Message "Internal error"
// @Router /tasks/all [get]
// @Router /tasks/{ID} [get]
func (t *Task) ReadOne() (err error) {
taskMap := make(map[int64]*Task, 1)