File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,8 +10,7 @@ export default [
1010 _id : 0 ,
1111 id : 1 ,
1212 displayName : '$currentName.usualName' ,
13- href : { $concat : [ '/structures/' , '$id' ] } ,
14- identifiers : 1 ,
13+ identifiers : { $ifNull : [ '$identifiers' , [ ] ] } ,
1514 } ,
1615 } ,
1716] ;
Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ const relationGroupQuery = [
125125 {
126126 $lookup : {
127127 from : 'relationgroups' ,
128- localField : '$ relationsGroupId' ,
128+ localField : 'relationsGroupId' ,
129129 foreignField : 'id' ,
130130 pipeline : [
131131 {
@@ -180,16 +180,6 @@ const relationResourceQuery = [
180180 ...resourceLookup ,
181181 ...relationTypeQuery ,
182182 ...relationGroupQuery ,
183- {
184- $lookup : {
185- from : 'relationtypes' ,
186- localField : 'relationTypeId' ,
187- foreignField : 'id' ,
188- pipeline : relationTypesLightQuery ,
189- as : 'relationType' ,
190- } ,
191- } ,
192- { $set : { relationType : { $arrayElemAt : [ '$relationType' , 0 ] } } } ,
193183 {
194184 $project : { ...projection , resource : 1 } ,
195185 } ,
You can’t perform that action at this time.
0 commit comments