File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
microservices/content/src/repositories Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ class SingleType extends Repository<SingleTypeEntity> {
49
49
}
50
50
51
51
if ( hasMany ) {
52
- return ( value = this . replaceRelationIdsOnEntities ( data , value , property ) ) ;
52
+ return ( value = this . replaceRelationIdsOnEntities ( data , value , property ) ! ) ;
53
53
}
54
54
55
55
value [ property ] = data ;
@@ -63,17 +63,14 @@ class SingleType extends Repository<SingleTypeEntity> {
63
63
data : unknown [ ] ,
64
64
value : ISingleTypeValue ,
65
65
property : string ,
66
- ) : ISingleTypeValue {
66
+ ) : ISingleTypeValue | void {
67
67
if ( ! Array . isArray ( value ) ) {
68
68
return value ;
69
69
}
70
70
71
- return value . map ( ( input ) => {
71
+ value . forEach ( ( input ) => {
72
72
if ( ! input . hasOwnProperty ( property ) ) {
73
- throw new BaseException ( {
74
- status : 500 ,
75
- message : `Invalid object format. "${ property } " property does not exist in "value" objects.` ,
76
- } ) ;
73
+ return ;
77
74
}
78
75
79
76
input [ property ] = replaceEntities (
You can’t perform that action at this time.
0 commit comments