Fix events being created for system objects (#4694)
* Fix events being created for system objects * move the condition above to avoid unnecessary db calls
This commit is contained in:
@ -49,6 +49,10 @@ export class EntityEventsToDbListener {
|
||||
payload: ObjectRecordCreateEvent<any>,
|
||||
operation: string,
|
||||
) {
|
||||
if (payload.objectMetadata.isSystem) {
|
||||
return;
|
||||
}
|
||||
|
||||
const isEventObjectEnabledFeatureFlag =
|
||||
await this.featureFlagRepository.findOneBy({
|
||||
workspaceId: payload.workspaceId,
|
||||
|
||||
@ -208,6 +208,7 @@ export class FieldMetadataService extends TypeOrmQueryService<FieldMetadataEntit
|
||||
view[0].id
|
||||
}')`,
|
||||
);
|
||||
await workspaceQueryRunner.commitTransaction();
|
||||
} catch (error) {
|
||||
await workspaceQueryRunner.rollbackTransaction();
|
||||
throw error;
|
||||
|
||||
Reference in New Issue
Block a user