Skip to content

Commit

Permalink
feat(holdings-record): Restrict updating without sourceId
Browse files Browse the repository at this point in the history
- fix tenant

Closes: MODINVSTOR-1161
  • Loading branch information
viacheslavpoliakov committed May 17, 2024
1 parent 23df34b commit 6561b65
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ramls/examples/holdings-storage/holdingsRecord_get.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "65cb2bf0-d4c2-4886-8ad0-b76f1ba75d61",
"instanceId": "cd28da0f-a3e4-465c-82f1-acade4e8e170",
"sourceId": "65cb2bf0-0000-4886-8ad0-b76f1ba75d22",
"sourceId": "8081d707-610f-4b50-a28b-c36a6d25191b",
"permanentLocationId": "d9cd0bed-1b49-4b5e-a7bd-064b8d177231",
"holdingsStatements": [
{
Expand Down
4 changes: 2 additions & 2 deletions ramls/examples/holdings-storage/holdingsRecords_get.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"id": "65cb2bf0-d4c2-4886-8ad0-b76f1ba75d61",
"instanceId": "cd28da0f-a3e4-465c-82f1-acade4e8e170",
"sourceId": "65cb2bf0-0000-4886-8ad0-b76f1ba75d22",
"sourceId": "8081d707-610f-4b50-a28b-c36a6d25191b",
"permanentLocationId": "d9cd0bed-1b49-4b5e-a7bd-064b8d177231",
"holdingsStatements": [
{
Expand All @@ -24,7 +24,7 @@
{
"id": "807084d2-1b6c-4448-a566-d3d9ebfd1c08",
"instanceId": "601a8dc4-dee7-48eb-b03f-d02fdf0debd0",
"sourceId": "65cb2bf0-1111-4886-8ad0-b76f1ba75d23",
"sourceId": "a779e45e-0e5e-4303-9c93-09dbbd215134",
"permanentLocationId": "d9cd0bed-1b49-4b5e-a7bd-064b8d177231",
"holdingsStatements": [
{
Expand Down
2 changes: 1 addition & 1 deletion ramls/examples/holdings-storage/holdingsRecords_post.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"id": "65cb2bf0-d4c2-4886-8ad0-b76f1ba75d61",
"instanceId": "cd28da0f-a3e4-465c-82f1-acade4e8e170",
"sourceId": "65cb2bf0-2222-4886-8ad0-b76f1ba75d22",
"sourceId": "8081d707-610f-4b50-a28b-c36a6d25191b",
"permanentLocationId": "d9cd0bed-1b49-4b5e-a7bd-064b8d177231",
"holdingsStatements": [
{
Expand Down
5 changes: 3 additions & 2 deletions src/test/java/org/folio/rest/api/HoldingsStorageTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -2456,7 +2456,7 @@ public void canCreateHoldingAndCreateShadowInstance() {
HoldingRequestBuilder builder = new HoldingRequestBuilder()
.withId(null)
.forInstance(instanceId)
.withSource(getPreparedHoldingSourceId())
.withSource(HOLDING_SOURCE_IDS[0])
.withPermanentLocation(MAIN_LIBRARY_LOCATION_ID);

JsonObject holding = holdingsClient.create(builder.create(), CONSORTIUM_MEMBER_TENANT,
Expand Down Expand Up @@ -3157,7 +3157,8 @@ private static void prepareThreeHoldingSource() {
String sourceId = HOLDING_SOURCE_IDS[i].toString();
holdingsSourceClient.create(new JsonObject()
.put("id", sourceId)
.put("name", "holding source name for " + sourceId));
.put("name", "holding source name for " + sourceId),
"consortium");
}
}

Expand Down

0 comments on commit 6561b65

Please sign in to comment.