Skip to content

Commit 35990a1

Browse files
fix: send only patched title
* if title is changed, send only the updated title instead of the whole changed request * because we get the request from `requests_service.search` we receive additional fields(from the marshmallow schema) which are then subject to validation checks downstream that might fail.
1 parent c0bd03d commit 35990a1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

invenio_curations/services/components.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,14 +134,16 @@ def _check_update_request(
134134

135135
if current_draft_title != updated_draft_title:
136136
title = updated_draft_title or record["id"] # type: ignore[index]
137-
request["title"] = f"RDM Curation: {title}"
137+
patch_request = {
138+
"title": f"RDM Curation: {title}",
139+
}
138140

139141
# Using system identity, to not have to update the default request can_update permission.
140142
# Data will be checked in the requests service.
141143
_get_requests_service().update(
142144
system_identity,
143145
request["id"],
144-
request,
146+
patch_request,
145147
uow=self.uow,
146148
)
147149

0 commit comments

Comments
 (0)