From 9aba561e2b6a9d285989f73fc2284edd61621517 Mon Sep 17 00:00:00 2001 From: Sam Lucidi Date: Tue, 10 Oct 2023 11:05:25 -0400 Subject: [PATCH] Add Builtin flag to Questionnaire resource Signed-off-by: Sam Lucidi --- api/questionnaire.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/questionnaire.go b/api/questionnaire.go index 66372df62..cc7d3699e 100644 --- a/api/questionnaire.go +++ b/api/questionnaire.go @@ -195,6 +195,7 @@ type Questionnaire struct { Sections []assessment.Section `json:"sections" yaml:"sections" binding:"required"` Thresholds assessment.Thresholds `json:"thresholds" yaml:"thresholds" binding:"required"` RiskMessages assessment.RiskMessages `json:"riskMessages" yaml:"riskMessages" binding:"required"` + Builtin bool `json:"builtin,omitempty" yaml:"builtin,omitempty"` } // With updates the resource with the model. @@ -203,6 +204,7 @@ func (r *Questionnaire) With(m *model.Questionnaire) { r.Name = m.Name r.Description = m.Description r.Required = m.Required + r.Builtin = m.Builtin() _ = json.Unmarshal(m.Sections, &r.Sections) _ = json.Unmarshal(m.Thresholds, &r.Thresholds) _ = json.Unmarshal(m.RiskMessages, &r.RiskMessages)