From 394bc9f709886b982b4f6134e117ec247b36175f Mon Sep 17 00:00:00 2001 From: kmetin Date: Mon, 6 Nov 2023 14:23:44 +0300 Subject: [PATCH] solve conflicts --- base/commands/migration/migration_stages.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/base/commands/migration/migration_stages.go b/base/commands/migration/migration_stages.go index 5e2f7dcd..208480e1 100644 --- a/base/commands/migration/migration_stages.go +++ b/base/commands/migration/migration_stages.go @@ -357,13 +357,18 @@ func querySingleRow(ctx context.Context, ci *hazelcast.ClientInternal, query str func maybePrintWarnings(ctx context.Context, ec plug.ExecContext, ci *hazelcast.ClientInternal, migrationID string) { q := fmt.Sprintf(`SELECT JSON_QUERY(this, '$.warnings' WITH WRAPPER) FROM %s WHERE __key='%s'`, StatusMapName, migrationID) - row, err := querySingleRow(ctx, ci, q) + r, err := querySingleRow(ctx, ci, q) + if err != nil { + ec.Logger().Error(err) + return + } + rr, err := r.Get(0) if err != nil { ec.Logger().Error(err) return } var warnings []string - err = json.Unmarshal(row.(serialization.JSON), &warnings) + err = json.Unmarshal(rr.(serialization.JSON), &warnings) if err != nil { ec.Logger().Error(err) return @@ -373,4 +378,4 @@ func maybePrintWarnings(ctx context.Context, ec plug.ExecContext, ci *hazelcast. } else { ec.PrintlnUnnecessary(fmt.Sprintf("You have %d warnings that you can find in your migration report.", len(warnings))) } -} \ No newline at end of file +}