diff --git a/database/build.go b/database/build.go index 69309492..79a856a2 100644 --- a/database/build.go +++ b/database/build.go @@ -173,7 +173,7 @@ func (b *Build) Nullify() *Build { // check if the DeployNumber field should be false if b.DeployNumber.Int64 == 0 { - b.Deploy.Valid = false + b.DeployNumber.Valid = false } // check if the Clone field should be false diff --git a/database/build_test.go b/database/build_test.go index 976c66d2..a7760659 100644 --- a/database/build_test.go +++ b/database/build_test.go @@ -276,7 +276,7 @@ func testBuild() *Build { Started: sql.NullInt64{Int64: 1563474078, Valid: true}, Finished: sql.NullInt64{Int64: 1563474079, Valid: true}, Deploy: sql.NullString{String: "", Valid: false}, - DeployNumber: sql.NullInt64{Int64: 0, Valid: true}, + DeployNumber: sql.NullInt64{Int64: 0, Valid: false}, DeployPayload: raw.StringSliceMap{"foo": "test1", "bar": "test2"}, Clone: sql.NullString{String: "https://github.com/github/octocat.git", Valid: true}, Source: sql.NullString{String: "https://github.com/github/octocat/48afb5bdc41ad69bf22588491333f7cf71135163", Valid: true},