From d0f6f0bbcb69b204cfe811ad1ed6501cc0bb772a Mon Sep 17 00:00:00 2001 From: "Claire.Nicholas" Date: Thu, 1 Feb 2024 13:21:33 -0600 Subject: [PATCH 1/2] fix: fixing Nullify() DeployNumber statment to actually work --- database/build.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From dd45186d7e0a603034d474010e40c73075ccc360 Mon Sep 17 00:00:00 2001 From: "Claire.Nicholas" Date: Thu, 1 Feb 2024 13:24:14 -0600 Subject: [PATCH 2/2] fix: changing test to work with new Nullify() DeployNumber statement --- database/build_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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},