From 2c6f51792711e58d7347b9de762b60196c1d28d0 Mon Sep 17 00:00:00 2001 From: Edoardo Sabadelli Date: Mon, 27 Nov 2023 10:55:03 +0100 Subject: [PATCH] refactor: rename function --- src/modules/layoutValidation.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/layoutValidation.js b/src/modules/layoutValidation.js index 0906142f3..3058df4e0 100644 --- a/src/modules/layoutValidation.js +++ b/src/modules/layoutValidation.js @@ -30,7 +30,7 @@ export const validateLineListLayout = (layout, { dryRun } = {}) => { // entity type (input type TE only) if ( layout.outputType === OUTPUT_TYPE_TRACKED_ENTITY && - !layoutHasEntityTypeId(layout) + !layoutHasTrackedEntityTypeId(layout) ) { if (dryRun) { return false @@ -80,7 +80,8 @@ export const validateLayout = (layout) => { export const layoutHasProgramId = (layout) => Boolean(layout?.program?.id) -export const layoutHasEntityTypeId = (layout) => Boolean(layout?.entityType?.id) +export const layoutHasTrackedEntityTypeId = (layout) => + Boolean(layout?.entityType?.id) export const aoCreatedInEventReportsApp = (layout) => layout?.legacy