This is an automated email from the ASF dual-hosted git repository.
mridulpathak pushed a commit to branch release24.09
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/release24.09 by this push:
new 888878981d Fixed: updatePartyInvitation silently no-ops on a
nonexistent record (OFBIZ-13594)
888878981d is described below
commit 888878981dd83c1f354b39a6510c631a99b22faa
Author: Mridul Pathak <[email protected]>
AuthorDate: Wed Sep 16 17:13:23 2026 +0530
Fixed: updatePartyInvitation silently no-ops on a nonexistent record
(OFBIZ-13594)
updatePartyInvitation built its updated value with makeValue instead of
fetching the existing PartyInvitation first, so updating a nonexistent
partyInvitationId matched zero rows on the underlying UPDATE instead of failing
cleanly, and the incoming parameters were never merged onto the existing record
before it was stored. It now looks up the existing PartyInvitation first,
returns an error if it is not found, and applies the incoming fields onto that
looked-up value before saving.
---
.../org/apache/ofbiz/party/party/PartyInvitationServices.groovy | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git
a/applications/party/src/main/groovy/org/apache/ofbiz/party/party/PartyInvitationServices.groovy
b/applications/party/src/main/groovy/org/apache/ofbiz/party/party/PartyInvitationServices.groovy
index 6857c5ae7c..d4a5074406 100644
---
a/applications/party/src/main/groovy/org/apache/ofbiz/party/party/PartyInvitationServices.groovy
+++
b/applications/party/src/main/groovy/org/apache/ofbiz/party/party/PartyInvitationServices.groovy
@@ -38,10 +38,14 @@ Map createPartyInvitation() {
}
Map updatePartyInvitation() {
- GenericValue lookedUpValue = makeValue('PartyInvitation', parameters)
+ GenericValue lookedUpValue =
from('PartyInvitation').where(parameters).queryOne()
+ if (!lookedUpValue) {
+ return error('PartyUiLabels', 'PartyInvitationNotValidError')
+ }
if (! parameters.toName && parameters.partyId) {
- lookedUpValue.toName = PartyHelper.getPartyName(delegator,
parameters.partyId, false)
+ parameters.toName = PartyHelper.getPartyName(delegator,
parameters.partyId, false)
}
+ lookedUpValue.setNonPKFields(parameters)
lookedUpValue.store()
return success()
}