fix: error 500 when license is null
All checks were successful
Deploy Production Server / if_merged (pull_request) Successful in 10m6s
All checks were successful
Deploy Production Server / if_merged (pull_request) Successful in 10m6s
This commit is contained in:
parent
47d3921e05
commit
50b49c40e3
@ -141,7 +141,7 @@ public class LicenceService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private Function<MembreModel, Uni<?>> genLicenceNumberAndAccountIfNeed() {
|
private Function<MembreModel, Uni<?>> genLicenceNumberAndAccountIfNeed() {
|
||||||
return membreModel -> ((membreModel.getLicence() <= 0) ?
|
return membreModel -> ((membreModel.getLicence() == null || membreModel.getLicence() <= 0) ?
|
||||||
sequenceRepository.getNextValueInTransaction(SequenceType.Licence)
|
sequenceRepository.getNextValueInTransaction(SequenceType.Licence)
|
||||||
.invoke(i -> membreModel.setLicence(Math.toIntExact(i)))
|
.invoke(i -> membreModel.setLicence(Math.toIntExact(i)))
|
||||||
.chain(() -> combRepository.persist(membreModel))
|
.chain(() -> combRepository.persist(membreModel))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user