Skip to content

Commit 108e350

Browse files
authored
Merge pull request #33 from umbraco/bugfix/shopify-async-value-converter
Fix asynchronous calls to Shopify in value converter and version update.
2 parents 8c12cc8 + 2a02777 commit 108e350

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

src/Umbraco.Cms.Integrations.Commerce.Shopify/Editors/ShopifyProductPickerValueConverter.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System;
22
using System.Collections.Generic;
33
using System.Linq;
4-
4+
using System.Threading.Tasks;
55
using Umbraco.Cms.Integrations.Commerce.Shopify.Models.ViewModels;
66
using Umbraco.Cms.Integrations.Commerce.Shopify.Services;
77

@@ -50,7 +50,9 @@ public override object ConvertIntermediateToObject(IPublishedElement owner, IPub
5050

5151
var ids = (long[]) inter;
5252

53-
var result = _apiService.GetResults().GetAwaiter().GetResult();
53+
var t = Task.Run(async () => await _apiService.GetResults());
54+
55+
var result = t.Result;
5456

5557
var products = from p in result.Result.Products
5658
where ids.Contains(p.Id)

src/Umbraco.Cms.Integrations.Commerce.Shopify/Umbraco.Cms.Integrations.Commerce.Shopify.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<PackageIconUrl></PackageIconUrl>
1111
<PackageProjectUrl>https://github.com/umbraco/Umbraco.Cms.Integrations</PackageProjectUrl>
1212
<RepositoryUrl>https://github.com/umbraco/Umbraco.Cms.Integrations</RepositoryUrl>
13-
<Version>1.0.1</Version>
13+
<Version>1.0.2</Version>
1414
<Authors>Umbraco HQ</Authors>
1515
<Company>Umbraco</Company>
1616
</PropertyGroup>

src/Umbraco.Cms.Integrations.Commerce.Shopify/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<info>
44
<package>
55
<name>Umbraco.Cms.Integrations.Commerce.Shopify</name>
6-
<version>1.0.1</version>
6+
<version>1.0.2</version>
77
<iconUrl></iconUrl>
88
<licence url="https://opensource.org/licenses/MIT">MIT</licence>
99
<url>https://github.com/umbraco/Umbraco.Cms.Integrations</url>

0 commit comments

Comments
 (0)