Merge pull request #10 from edgebox-iot/fix-result-null-conversion

Fix query panic on GetNextTask()
pull/14/head
Paulo Truta 2021-06-02 13:11:48 +02:00 committed by GitHub
commit c9f97d42bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -70,7 +70,7 @@ func GetNextTask() Task {
panic(err.Error())
}
results, err := db.Query("SELECT * FROM task WHERE status = 0 ORDER BY created ASC LIMIT 1;")
results, err := db.Query("SELECT id, task, args, status, result, created, updated FROM task WHERE status = 0 ORDER BY created ASC LIMIT 1;")
// if there is an error inserting, handle it
if err != nil {