File tree Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -27,15 +27,6 @@ export class CommonRepository {
27
27
@Inject ( DatabaseService )
28
28
protected db : DatabaseService ;
29
29
30
- async isUnique ( value : string , label : string ) {
31
- const exists = await this . db
32
- . query ( )
33
- . matchNode ( 'node' , label , { value } )
34
- . return ( 'node' )
35
- . first ( ) ;
36
- return ! exists ;
37
- }
38
-
39
30
async getBaseNode (
40
31
id : ID ,
41
32
label ?: string | ResourceShape < any > | EnhancedResource < any > ,
Original file line number Diff line number Diff line change @@ -56,7 +56,12 @@ export const DtoRepository = <
56
56
}
57
57
label = defaultLabel ;
58
58
}
59
- return await super . isUnique ( value , label ) ;
59
+ const exists = await this . db
60
+ . query ( )
61
+ . matchNode ( 'node' , label , { value } )
62
+ . return ( 'node' )
63
+ . first ( ) ;
64
+ return ! exists ;
60
65
}
61
66
@Once ( ) private get uniqueLabel ( ) {
62
67
const labels = resource . Props . flatMap (
You can’t perform that action at this time.
0 commit comments