@@ -126,7 +126,8 @@ public async Task ProcessRentalReportUploadAsync(DssUploadDelivery upload)
126
126
_logger . LogInformation ( $ "Processing listing ({ row . OrgCd } - { row . ListingId } )") ;
127
127
128
128
var stopwatch = Stopwatch . StartNew ( ) ;
129
- ( isSuccessful , isValid ) = await ProcessUploadLine ( report , upload , uploadLine , row , isLastLine ) ;
129
+ bool doValidateRegistration = await DoRegistrationValidation ( upload . UpdUserGuid ) ;
130
+ ( isSuccessful , isValid ) = await ProcessUploadLine ( report , upload , uploadLine , row , doValidateRegistration , isLastLine ) ;
130
131
stopwatch . Stop ( ) ;
131
132
132
133
processedCount ++ ;
@@ -219,18 +220,18 @@ public async Task ProcessRentalReportUploadAsync(DssUploadDelivery upload)
219
220
_logger . LogInformation ( $ "Finished: { report . ReportPeriodYm . ToString ( "yyyy-MM" ) } , { report . ProvidingOrganization . OrganizationNm } - { processStopwatch . Elapsed . TotalSeconds } seconds") ;
220
221
}
221
222
222
- private async Task < ( bool , bool ) > ProcessUploadLine ( DssRentalListingReport report , DssUploadDelivery upload , DssUploadLine uploadLine , RentalListingRowUntyped row , bool isLastLine )
223
+ private async Task < ( bool , bool ) > ProcessUploadLine ( DssRentalListingReport report , DssUploadDelivery upload , DssUploadLine uploadLine , RentalListingRowUntyped row ,
224
+ bool doValidateRegistration , bool isLastLine )
223
225
{
224
226
var errors = new Dictionary < string , List < string > > ( ) ;
225
- bool doValidateRegistration = await DoRegistrationValidation ( upload . UpdUserGuid ) ;
226
227
bool isRegistrationValid = false ;
227
228
string registrationTxt = "" ;
228
229
229
230
// Validate of the incoming line
230
231
_validator . Validate ( Entities . RentalListingRowUntyped , row , errors ) ;
231
232
if ( errors . Count > 0 )
232
233
{
233
- SaveUploadLine ( uploadLine , errors , true , "" , doValidateRegistration , true , errors . ParseError ( ) ) ;
234
+ SaveUploadLine ( uploadLine , errors , true , "" , true , errors . ParseError ( ) ) ;
234
235
if ( isLastLine ) await _reportRepo . UpdateInactiveListings ( upload . ProvidingOrganizationId ) ;
235
236
_unitOfWork . Commit ( ) ;
236
237
return ( false , isRegistrationValid ) ;
@@ -261,7 +262,7 @@ public async Task ProcessRentalReportUploadAsync(DssUploadDelivery upload)
261
262
( isRegistrationValid , registrationTxt ) = await _permitValidation . CheckStraaExemptionStatus ( row . RentalAddress ) ;
262
263
}
263
264
264
- SaveUploadLine ( uploadLine , errors , false , systemError , doValidateRegistration , ! isRegistrationValid , registrationTxt ) ;
265
+ SaveUploadLine ( uploadLine , errors , false , systemError , ! isRegistrationValid , registrationTxt ) ;
265
266
266
267
_unitOfWork . Commit ( ) ;
267
268
@@ -301,7 +302,7 @@ public async Task ProcessRentalReportUploadAsync(DssUploadDelivery upload)
301
302
}
302
303
303
304
private void SaveUploadLine ( DssUploadLine uploadLine , Dictionary < string , List < string > > errors , bool isValidationFailure , string systemError ,
304
- bool doValidateRegistration , bool isRegistrationFailure , string registrationTxt )
305
+ bool isRegistrationFailure , string registrationTxt )
305
306
{
306
307
uploadLine . IsRegistrationFailure = isRegistrationFailure ;
307
308
uploadLine . RegistrationTxt = registrationTxt ;
0 commit comments