Skip to content

Commit

Permalink
use NullString for reading status ID for declaration status
Browse files Browse the repository at this point in the history
  • Loading branch information
jessepeterson committed Aug 16, 2023
1 parent b1e9cba commit da651c7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion storage/mysql/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ ORDER BY
var id, updatedAt string
var reasonJSON []byte
var status ddm.DeclarationQueryStatus
var statusID sql.NullString
err = rows.Scan(
&id,
&status.Identifier,
Expand All @@ -297,11 +298,12 @@ ORDER BY
&status.ServerToken,
&updatedAt,
&status.Current,
&status.StatusID,
&statusID,
)
if err != nil {
break
}
status.StatusID = statusID.String
status.StatusReceived, err = time.Parse(mysqlTimeFormat, updatedAt)
if err != nil {
break
Expand Down

0 comments on commit da651c7

Please sign in to comment.