Correlations: Migrate config type to root (#91855)

* WIP

* Validate new field, and add value in provisioning if not defined in correct spot

* Simplify logic, use correct value

* fix tests

* Fix linter errors

* fix swagger and tests

* 😬

* Auto-generation isnt doing this..

* Fix linter

* test if nullable is the issue…

* Change structure on the frontend fields

* Try with backtick

* try programatic quoting

* Try only quote non-ints

* quoting, no backticks

* Remove debugging
This commit is contained in:
Kristina
2024-08-26 08:02:48 -05:00
committed by GitHub
parent 84e5c3af22
commit 1dd830b9f1
21 changed files with 114 additions and 113 deletions
+4 -3
View File
@@ -22,6 +22,7 @@ func (s CorrelationsService) createCorrelation(ctx context.Context, cmd CreateCo
Description: cmd.Description,
Config: cmd.Config,
Provisioned: cmd.Provisioned,
Type: cmd.Type,
}
err := s.SQLStore.WithTransactionalDbSession(ctx, func(session *db.Session) error {
@@ -131,14 +132,14 @@ func (s CorrelationsService) updateCorrelation(ctx context.Context, cmd UpdateCo
correlation.Description = *cmd.Description
session.MustCols("description")
}
if cmd.Type != nil {
correlation.Type = *cmd.Type
}
if cmd.Config != nil {
session.MustCols("config")
if cmd.Config.Field != nil {
correlation.Config.Field = *cmd.Config.Field
}
if cmd.Config.Type != nil {
correlation.Config.Type = *cmd.Config.Type
}
if cmd.Config.Target != nil {
correlation.Config.Target = *cmd.Config.Target
}