File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
src/Umbraco.Commerce.Deploy/Connectors/ValueConnectors Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -76,14 +76,18 @@ public class UmbracoCommercePriceValueConnector(
76
76
77
77
var dstDict = new Dictionary < Guid , decimal ? > ( ) ;
78
78
79
- foreach ( KeyValuePair < string , decimal ? > kvp in srcDict )
79
+ if ( srcDict != null )
80
80
{
81
- if ( UdiHelper . TryParseGuidUdi ( kvp . Key , out GuidUdi ? udi ) && udi ! . EntityType == UmbracoCommerceConstants . UdiEntityType . Currency )
81
+ foreach ( KeyValuePair < string , decimal ? > kvp in srcDict )
82
82
{
83
- CurrencyReadOnly ? currencyEntity = await umbracoCommerceApi . GetCurrencyAsync ( udi . Guid ) ;
84
- if ( currencyEntity != null )
83
+ if ( UdiHelper . TryParseGuidUdi ( kvp . Key , out GuidUdi ? udi ) &&
84
+ udi ! . EntityType == UmbracoCommerceConstants . UdiEntityType . Currency )
85
85
{
86
- dstDict . Add ( currencyEntity . Id , kvp . Value ) ;
86
+ CurrencyReadOnly ? currencyEntity = await umbracoCommerceApi . GetCurrencyAsync ( udi . Guid ) ;
87
+ if ( currencyEntity != null )
88
+ {
89
+ dstDict . Add ( currencyEntity . Id , kvp . Value ) ;
90
+ }
87
91
}
88
92
}
89
93
}
You can’t perform that action at this time.
0 commit comments