Fix family-member PUT 500; CORS POST 403; Hikari local password default
- ClientFamilyMembersWritePlatformServiceImpl#updateFamilyMember: guard maritalStatusId/genderId/professionId with != null instead of != 0 so a payload that omits these keys doesn't NPE when the boxed Long is unboxed. - application.properties: fix the broken property name `fineract.security.cors.allowed-metho pas` -> `allowed-methods`. The typo left CORS allowed-methods empty, which made Spring reject every browser POST with "Invalid CORS request" 403 once the SPA sent an Origin header. - application.properties: change the Hikari default password from 313863 to root so the local devRun matches the tenant-DB default at line 49. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
d32953ed76
commit
45585ecc10
+3
-3
@@ -463,19 +463,19 @@ public class ClientFamilyMembersWritePlatformServiceImpl implements ClientFamily
|
||||
clientFamilyMember.setRelationship(relationship);
|
||||
}
|
||||
|
||||
if (command.longValueOfParameterNamed("maritalStatusId") != 0) {
|
||||
if (command.longValueOfParameterNamed("maritalStatusId") != null) {
|
||||
maritalStatusId = command.longValueOfParameterNamed("maritalStatusId");
|
||||
maritalStatus = this.codeValueRepository.getReferenceById(maritalStatusId);
|
||||
clientFamilyMember.setMaritalStatus(maritalStatus);
|
||||
}
|
||||
|
||||
if (command.longValueOfParameterNamed("genderId") != 0) {
|
||||
if (command.longValueOfParameterNamed("genderId") != null) {
|
||||
genderId = command.longValueOfParameterNamed("genderId");
|
||||
gender = this.codeValueRepository.getReferenceById(genderId);
|
||||
clientFamilyMember.setGender(gender);
|
||||
}
|
||||
|
||||
if (command.longValueOfParameterNamed("professionId") != 0) {
|
||||
if (command.longValueOfParameterNamed("professionId") != null) {
|
||||
professionId = command.longValueOfParameterNamed("professionId");
|
||||
profession = this.codeValueRepository.getReferenceById(professionId);
|
||||
clientFamilyMember.setProfession(profession);
|
||||
|
||||
@@ -407,7 +407,7 @@ server.tomcat.mbeanregistry.enabled=${FINERACT_SERVER_TOMCAT_MBEANREGISTRY_ENABL
|
||||
spring.datasource.hikari.driverClassName=${FINERACT_HIKARI_DRIVER_SOURCE_CLASS_NAME:org.postgresql.Driver}
|
||||
spring.datasource.hikari.jdbcUrl=${FINERACT_HIKARI_JDBC_URL:jdbc:postgresql://localhost:5432/fineract_tenants}
|
||||
spring.datasource.hikari.username=${FINERACT_HIKARI_USERNAME:postgres}
|
||||
spring.datasource.hikari.password=${FINERACT_HIKARI_PASSWORD:313863}
|
||||
spring.datasource.hikari.password=${FINERACT_HIKARI_PASSWORD:root}
|
||||
spring.datasource.hikari.minimumIdle=${FINERACT_HIKARI_MINIMUM_IDLE:3}
|
||||
spring.datasource.hikari.maximumPoolSize=${FINERACT_HIKARI_MAXIMUM_POOL_SIZE:10}
|
||||
spring.datasource.hikari.idleTimeout=${FINERACT_HIKARI_IDLE_TIMEOUT:60000}
|
||||
|
||||
Reference in New Issue
Block a user