Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Weiko committed Aug 30, 2024
1 parent 8f20dcf commit 1213434
Showing 1 changed file with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,17 +150,19 @@ export class SetCustomObjectIsSoftDeletableCommand extends ActiveWorkspacesComma
}) satisfies Partial<FieldMetadataEntity>,
);

if (newDeletedAtFields.length > 0) {
const createdDeletedAtFields =
await this.fieldMetadataRepository.insert(newDeletedAtFields);

this.logger.log(
`Created ${createdDeletedAtFields.identifiers.length} deletedAt fields for workspace ${workspaceId}`,
);
} else {
if (newDeletedAtFields.length === 0) {
this.logger.log(
`No new deletedAt fields needed for workspace ${workspaceId}`,
);

return;
}

const createdDeletedAtFields =
await this.fieldMetadataRepository.insert(newDeletedAtFields);

this.logger.log(
`Created ${createdDeletedAtFields.identifiers.length} deletedAt fields for workspace ${workspaceId}`,
);
}
}

0 comments on commit 1213434

Please sign in to comment.