fix: nested relations not working and relations not prefixed (#2782)
* fix: nested relations n+n * fix: prefix custom relations * fix: only apply targetColumnMap when it's a custom object * fix: force workspaceId to be provided * fix: toIsCustom -> isToCustom * fix: remove console.log
This commit is contained in:
@ -26,10 +26,11 @@ export class BeforeDeleteOneObject implements BeforeDeleteOneHook<any> {
|
||||
}
|
||||
|
||||
const objectMetadata =
|
||||
await this.objectMetadataService.findOneWithinWorkspace(
|
||||
instance.id.toString(),
|
||||
workspaceId,
|
||||
);
|
||||
await this.objectMetadataService.findOneWithinWorkspace(workspaceId, {
|
||||
where: {
|
||||
id: instance.id.toString(),
|
||||
},
|
||||
});
|
||||
|
||||
if (!objectMetadata) {
|
||||
throw new BadRequestException('Object does not exist');
|
||||
|
||||
Reference in New Issue
Block a user