File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
src/Umbraco.Forms.Integrations.Crm.ActiveCampaign Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -43,12 +43,10 @@ public override WorkflowExecutionStatus Execute(WorkflowExecutionContext context
43
43
44
44
var contacts = _contactService . Get ( email ) . Result ;
45
45
46
- var result = _contactService . CreateOrUpdate ( new ContactRequestDto
47
- {
48
- Contact = contacts . Contacts . Count > 0
49
- ? contacts . Contacts . First ( ) : Build ( context . Record )
50
- } ,
51
- contacts . Contacts . Count > 0 ) . Result ;
46
+ var requestDto = new ContactRequestDto { Contact = Build ( context . Record ) } ;
47
+ if ( contacts . Contacts . Count > 0 ) requestDto . Contact . Id = contacts . Contacts . First ( ) . Id ;
48
+
49
+ var result = _contactService . CreateOrUpdate ( requestDto , contacts . Contacts . Count > 0 ) . Result ;
52
50
53
51
if ( ! result ) return WorkflowExecutionStatus . Failed ;
54
52
You can’t perform that action at this time.
0 commit comments