Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: persisting null value for a non-nullable field in affected party #158

Merged
merged 4 commits into from
Dec 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import javax.servlet.http.HttpServletRequest;

import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
Expand Down Expand Up @@ -46,6 +47,10 @@ protected Transaction transactionStart(HttpServletRequest request, TransactionTy
* @param identifier The value of the identifier
*/
protected void addAffectedParty(Transaction transaction, IdentifierType type, String identifier, AffectedPartyDirection direction) {
if (StringUtils.isEmpty(identifier)) {
logger.info("Unable to audit transaction for identifier type {} due to a possible {} failure", type, direction);
return;
}
auditService.createAffectedParty(transaction, type, identifier, direction);
}

Expand Down