File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed
src/Umbraco.Forms.Integrations.Crm.ActiveCampaign Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change 1
- using Microsoft . Extensions . Logging ;
1
+ using Lucene . Net . Index ;
2
+ using Microsoft . Extensions . Logging ;
2
3
using Microsoft . Extensions . Options ;
4
+ using System ;
3
5
using System . Text . Json ;
4
6
using Umbraco . Forms . Core ;
5
7
using Umbraco . Forms . Core . Enums ;
@@ -124,15 +126,19 @@ public override List<Exception> ValidateSettings()
124
126
var list = new List < Exception > ( ) ;
125
127
126
128
if ( string . IsNullOrEmpty ( ContactMappings ) )
129
+ {
127
130
list . Add ( new Exception ( "Contact mappings are required." ) ) ;
128
-
129
- var mappings = JsonSerializer . Deserialize < List < ContactMappingDto > > ( ContactMappings ) ;
130
- foreach ( var contactField in _settings . ContactFields . Where ( p => p . Required ) )
131
+ }
132
+ else
131
133
{
132
- if ( ! mappings . Any ( p => p . ContactField == contactField . Name ) )
134
+ var mappings = JsonSerializer . Deserialize < List < ContactMappingDto > > ( ContactMappings ) ;
135
+ foreach ( var contactField in _settings . ContactFields . Where ( p => p . Required ) )
133
136
{
134
- list . Add ( new Exception ( "Invalid contact mappings. Please make sure the mandatory fields are mapped." ) ) ;
135
- break ;
137
+ if ( ! mappings . Any ( p => p . ContactField == contactField . Name ) )
138
+ {
139
+ list . Add ( new Exception ( "Invalid contact mappings. Please make sure the mandatory fields are mapped." ) ) ;
140
+ break ;
141
+ }
136
142
}
137
143
}
138
144
You can’t perform that action at this time.
0 commit comments