fix update of client which was blanking out name details in certain scenario.

This commit is contained in:
Keith Woodlock
2012-08-07 23:43:05 +01:00
parent 762e7b14d9
commit e1c1cb4c41
@@ -112,7 +112,7 @@ public class Client extends AbstractAuditableCustom<AppUser, Long> {
this.lastName = command.getLastname();
}
if (command.isClientOrBusinessNameChanged()) {
if (command.isClientOrBusinessNameChanged() && StringUtils.isNotBlank(command.getClientOrBusinessName())) {
this.lastName = command.getClientOrBusinessName();
this.firstName = null;
}