From 02ba8a59c545a562e6f46dc9e19129a9f8076661 Mon Sep 17 00:00:00 2001 From: galactica Date: Wed, 12 Feb 2025 15:19:25 +0200 Subject: [PATCH 1/2] Change State ID to int --- internal/commands/predicates.go | 2 +- internal/wrappers/predicates.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/commands/predicates.go b/internal/commands/predicates.go index 70f955f8d..f6669a93a 100644 --- a/internal/commands/predicates.go +++ b/internal/commands/predicates.go @@ -206,7 +206,7 @@ type predicateView struct { SimilarityID string `format:"name:Similarity ID"` Severity string State string - StateID string + StateID int Comment string CreatedBy string CreatedAt time.Time `format:"name:Created at;time:01-02-06 15:04:05"` diff --git a/internal/wrappers/predicates.go b/internal/wrappers/predicates.go index 08b58ffef..3bb27571f 100644 --- a/internal/wrappers/predicates.go +++ b/internal/wrappers/predicates.go @@ -10,7 +10,7 @@ type BasePredicate struct { State string `json:"state"` Severity string `json:"severity"` Comment string `json:"comment"` - StateID string `json:"StateId"` + StateID int `json:"StateId"` } type PredicateRequest struct { From 2cf4cfd1a948bb3bd35e059ced76ea26e04fec12 Mon Sep 17 00:00:00 2001 From: galactica Date: Wed, 12 Feb 2025 16:28:38 +0200 Subject: [PATCH 2/2] Fix --- internal/wrappers/predicates.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/wrappers/predicates.go b/internal/wrappers/predicates.go index 3bb27571f..eee0c0beb 100644 --- a/internal/wrappers/predicates.go +++ b/internal/wrappers/predicates.go @@ -10,7 +10,7 @@ type BasePredicate struct { State string `json:"state"` Severity string `json:"severity"` Comment string `json:"comment"` - StateID int `json:"StateId"` + StateID int `json:"stateId"` } type PredicateRequest struct {