From 32b9e5fb6e728693615608f44a0c245f9756f8c7 Mon Sep 17 00:00:00 2001 From: bill-rich Date: Wed, 2 Sep 2020 09:56:44 -0700 Subject: [PATCH] Remove duplicate code --- .../internal/helper/contentlibrary/content_library_helper.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/vsphere/internal/helper/contentlibrary/content_library_helper.go b/vsphere/internal/helper/contentlibrary/content_library_helper.go index 71519097b..df164b37b 100644 --- a/vsphere/internal/helper/contentlibrary/content_library_helper.go +++ b/vsphere/internal/helper/contentlibrary/content_library_helper.go @@ -168,9 +168,6 @@ func CreateLibraryItem(c *rest.Client, l *library.Library, name string, desc str if err != nil { return nil, provider.ProviderError(name, "CreateLibraryItem", err) } - defer func() { - _ = clm.CompleteLibraryItemUpdateSession(ctx, session) - }() uploadSession.UploadSession = session defer func() { _ = clm.CompleteLibraryItemUpdateSession(ctx, session)