File tree Expand file tree Collapse file tree
rest/src/test/groovy/whelk/rest/api
whelk-core/src/main/groovy/whelk Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1190,7 +1190,7 @@ class CrudSpec extends Specification {
11901190 " @type" : " Item" ,
11911191 " contains" : " some new data" ,
11921192 " heldBy" :
1193- [" code " : " Ting" ]]]]
1193+ [" @id " : " https://libris.kb.se/library/ Ting" ]]]]
11941194 request. getInputStream() >> {
11951195 new ServletInputStreamMock (mapper. writeValueAsBytes(postData))
11961196 }
@@ -1201,7 +1201,7 @@ class CrudSpec extends Specification {
12011201 " POST"
12021202 }
12031203 LegacyIntegrationTools . determineLegacyCollection(_, _) >> {
1204- return " bib "
1204+ return " hold "
12051205 }
12061206 request. getContentType() >> {
12071207 " application/ld+json"
Original file line number Diff line number Diff line change @@ -370,7 +370,7 @@ class Document {
370370 }
371371
372372 boolean isHolding (JsonLd jsonld ) {
373- return ( " hold" == getLegacyCollection(jsonld))
373+ return " hold" == getLegacyCollection(jsonld) || jsonld . isSubClassOf(getThingType(), " Item " )
374374 }
375375
376376 String getLegacyCollection (JsonLd jsonld ) {
You can’t perform that action at this time.
0 commit comments