@@ -35,11 +35,13 @@ function _contextid(contextInput) {
3535 if ( Array . isArray ( contextInput ) ) {
3636 for ( const c of contextInput ) {
3737 contextURI = c
38+ console . log ( "For context 2 " + contextURI )
3839 bool = knownContexts . some ( contextCheck )
3940 if ( bool ) break
4041 }
4142 }
4243 else {
44+ console . log ( "For context 1 " + contextURI )
4345 bool = knownContexts . some ( contextCheck )
4446 }
4547 return bool
@@ -278,6 +280,7 @@ const putUpdate = async function (req, res, next) {
278280 }
279281 else {
280282 id = ObjectID ( )
283+ let context = objectReceived [ "@context" ] ? { "@context" : objectReceived [ "@context" ] } : { }
281284 let rerumProp = { "__rerum" : utils . configureRerumOptions ( generatorAgent , originalObject , true , false ) [ "__rerum" ] }
282285 delete objectReceived [ "_rerum" ]
283286 delete objectReceived [ "_id" ]
@@ -1021,7 +1024,7 @@ const bulkCreate = async function (req, res, next) {
10211024 const id = isValidID ( providedID ) ? providedID : ObjectID ( )
10221025 let generatorAgent = getAgentClaim ( req , next )
10231026 d = utils . configureRerumOptions ( generatorAgent , d )
1024- if ( _contextid ( provided [ "@context" ] ) ) {
1027+ if ( _contextid ( d [ "@context" ] ) ) {
10251028 // id is also protected in this case, so it can't be set.
10261029 delete d . id
10271030 }
0 commit comments