File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
src/ECER.Managers.Registry Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -63,12 +63,10 @@ public class ApplicationHandlers(
6363 }
6464 } , cancellationToken ) ;
6565
66- var draftApplicationResults = new ApplicationsQueryResults ( mapper . Map < IEnumerable < Contract . Applications . Application > > ( applications ) ! ) ;
67- var existingDraftApplication = draftApplicationResults . Items . FirstOrDefault ( ) ;
68- if ( existingDraftApplication != null )
66+ if ( applications . Any ( ) )
6967 {
7068 // user already has a draft application
71- throw new InvalidOperationException ( $ "User already has an application in progress with id '{ existingDraftApplication . Id } '") ;
69+ throw new InvalidOperationException ( $ "User already has an application in progress with id '{ applications . SingleOrDefault ( ) ! . Id } '") ;
7270 }
7371 }
7472 request . Application . Origin = Contract . Applications . ApplicationOrigin . Portal ; // Set application origin to "Portal"
You can’t perform that action at this time.
0 commit comments