File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
libs/@local/graph/postgres-store/src/permissions
tests/hash-backend-integration/src/tests/graph/ontology/primitive Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -1165,9 +1165,7 @@ where
11651165 . await
11661166 . map_err ( |error| {
11671167 let policy_error = match error. code ( ) {
1168- Some ( & SqlState :: FOREIGN_KEY_VIOLATION ) => {
1169- ActionError :: HasChildren { id : action }
1170- }
1168+ Some ( & SqlState :: RESTRICT_VIOLATION ) => ActionError :: HasChildren { id : action } ,
11711169 _ => ActionError :: StoreError ,
11721170 } ;
11731171 Report :: new ( error) . change_context ( policy_error)
Original file line number Diff line number Diff line change @@ -372,6 +372,8 @@ describe("Entity type CRU", () => {
372372 ] ,
373373 ) ;
374374
375+ closedMultiEntityType . allOf . sort ( ( a , b ) => a . $id . localeCompare ( b . $id ) ) ;
376+
375377 // It's not specified how `required` is ordered, so we need to sort it before comparing
376378 if ( closedMultiEntityType . required ) {
377379 closedMultiEntityType . required . sort ( ) ;
@@ -389,6 +391,7 @@ describe("Entity type CRU", () => {
389391 ) ,
390392 ) ;
391393 assert ( allOf !== undefined ) ;
394+ allOf . sort ( ( a , b ) => a . $id . localeCompare ( b . $id ) ) ;
392395
393396 expect ( closedMultiEntityType ) . toEqual ( {
394397 allOf,
You can’t perform that action at this time.
0 commit comments