Skip to content

Commit

Permalink
Ignore the settings on import #15
Browse files Browse the repository at this point in the history
Ignore the settings by key on import, just covers situation where the values might have been exported but we don't want them imported.
  • Loading branch information
KevinJump committed Oct 7, 2022
1 parent 370ec13 commit 0f4ac6d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Vendr.uSync/Serializers/PaymentMethodSeralizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@ private void DeserializeProviderSettings(XElement node, PaymentMethod item)
foreach (var setting in root.Elements("Setting"))
{
var key = setting.Element("Key").ValueOrDefault(string.Empty);

// don't do anything with settings that are in the ignore list.
if (StringExtensions.InvariantContains(_settingsAccessor.Settings.PaymentMethods.IgnoreSettings, key))
continue;

if (!string.IsNullOrWhiteSpace(key))
{
var value = setting.Element("Value").ValueOrDefault(string.Empty);
Expand Down

0 comments on commit 0f4ac6d

Please sign in to comment.