Skip to content

Commit

Permalink
fix: fixing Nullify() DeployNumber statment to actually work (#351)
Browse files Browse the repository at this point in the history
* fix: fixing Nullify() DeployNumber statment to actually work

* fix: changing test to work with new Nullify() DeployNumber statement

---------

Co-authored-by: Claire.Nicholas <Z00B3R3@w6nxmk4t6t.target.com>
  • Loading branch information
claire1618 and Claire.Nicholas authored Feb 1, 2024
1 parent 86cbe53 commit 867f2d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion database/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion database/build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down

0 comments on commit 867f2d1

Please sign in to comment.