feat: add club_id to LicenceModel for stats
This commit is contained in:
@@ -53,6 +53,7 @@ public class LicenceService {
|
||||
return combRepository.findById(id).chain(membreModel -> {
|
||||
LicenceModel model = new LicenceModel();
|
||||
model.setMembre(membreModel);
|
||||
model.setClub_id((membreModel.getClub() == null) ? null : membreModel.getClub().getId());
|
||||
model.setSaison(form.getSaison());
|
||||
model.setCertificate(form.getCertificate());
|
||||
model.setValidate(form.isValidate());
|
||||
@@ -92,9 +93,10 @@ public class LicenceService {
|
||||
.invoke(Unchecked.consumer(count -> {
|
||||
if (count > 0)
|
||||
throw new DBadRequestException("Licence déjà demandée");
|
||||
})).chain(__ -> combRepository.findById(id).chain(combRepository -> {
|
||||
})).chain(__ -> combRepository.findById(id).chain(membreModel2 -> {
|
||||
LicenceModel model = new LicenceModel();
|
||||
model.setMembre(combRepository);
|
||||
model.setClub_id((membreModel2.getClub() == null) ? null : membreModel2.getClub().getId());
|
||||
model.setMembre(membreModel2);
|
||||
model.setSaison(Utils.getSaison());
|
||||
model.setCertificate(form.getCertificate());
|
||||
model.setValidate(false);
|
||||
|
||||
Reference in New Issue
Block a user