Skip to content

Commit

Permalink
add condition to make response cleaner (#1563)
Browse files Browse the repository at this point in the history
# Description

This PR includes the following proposed change(s):

- add condition to make response cleaner - getLicence for sole
proprietor
  • Loading branch information
peggy-quartech authored Oct 17, 2024
1 parent 70bb7fd commit 28cb37b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Spd.Manager.Licence/LicenceManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ private async Task GetSoleProprietorInfoAsync(LicenceResponse lic, LicenceResp l
lic.LinkedSoleProprietorLicenceId = bizLic?.LicenceId;
lic.LinkedSoleProprietorExpiryDate = bizLic?.ExpiryDate;
}
if (licResp.ServiceTypeCode == ServiceTypeEnum.SecurityBusinessLicence)
if (licResp.ServiceTypeCode == ServiceTypeEnum.SecurityBusinessLicence &&
(licResp.BizTypeCode == BizTypeEnum.NonRegisteredSoleProprietor || licResp.BizTypeCode == BizTypeEnum.RegisteredSoleProprietor))
{
BizResult? biz = await _bizRepository.GetBizAsync((Guid)lic.LicenceHolderId, cancellationToken);
lic.LinkedSoleProprietorLicenceId = biz?.SoleProprietorSwlContactInfo?.LicenceId;
Expand Down

0 comments on commit 28cb37b

Please sign in to comment.