From 815437a9d2b585413123bc1f36c7a42eb0bdc909 Mon Sep 17 00:00:00 2001 From: Krzysztof Klimonda Date: Thu, 29 Aug 2024 14:39:14 +0200 Subject: [PATCH] Fix importing and unimporting from empty lists --- templates/sdk/service.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/sdk/service.tmpl b/templates/sdk/service.tmpl index e410a0d9..8f714cb9 100644 --- a/templates/sdk/service.tmpl +++ b/templates/sdk/service.tmpl @@ -110,7 +110,7 @@ func (s *Service) importToLocations(ctx context.Context, loc Location, importLoc } bytes, _, err := s.client.Communicate(ctx, cmd, false, nil) - if err != nil { + if err != nil && !errors.IsObjectNotFound(err) { return err } @@ -162,7 +162,7 @@ func (s *Service) unimportFromLocations(ctx context.Context, updates *xmlapi.Mul } bytes, _, err := s.client.Communicate(ctx, cmd, false, nil) - if err != nil { + if err != nil && !errors.IsObjectNotFound(err) { return err }